Skip to content

Scalar input can’t be float16_t #6812

Answered by abadams
Vernlium asked this question in Q&A
Discussion options

You must be logged in to vote

The issue with scalar float16 inputs is the ABI. We're not sure exactly how they should be passed on different platforms. Some ABIs put them in floating-point-specific registers, but in other cases Halide treats them as uint16s for passing them. For now you should just cast scalar float16 inputs to float32 on the C++ side and cast them back to float16 in the Halide code.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Vernlium
Comment options

Answer selected by Vernlium
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants