Repository navigation
fix(moore): use portable fp16 type mapping - #56
Merged
Merged
Conversation
gongchensu
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Float16type in its public type mapping.Context
9e2e985fstarted exporting each enabled backend'sdata_type_.hthroughgenerated.h. On Moore, this exposed the mapping to MUSAhalf, butmusa_fp16.hdoes not definehalf(or__half) for the host compilation used by InfiniRT'smcc_wrapper.shpath. This made public headers andreusable_memory_pool.ccfail withunknown type name 'half'.The public mapping is a host-side dispatch/tag type. The common
Float16type is portable, has the required 2-byte representation, and avoids depending on MUSA compiler-internal type definitions.Validation
Built on a Moore runner with MUSA 4.3.1:
cmake -S . -B build -DWITH_CPU=ON -DWITH_MOORE=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build -j8Before this change, the build fails in
reusable_memory_pool.cc/ generated public headers. With this change,infinirtbuilds and links. Also installed headers and compiled a downstream public-header consumer against the installed library successfully.