-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure all Halide arithmetic scalar types can be named from the Generator interface. #7934
Conversation
Generator interface. Specifically adding 64-bit signed and unsigned integers and making sure float16 and bfloat16 are fully supported and documented. Add a simple test for all the type names.
(There are a couple whitespace fixes in the Makefile as well.) |
backend. The name mapping should still be tested but the types passed do not seem to be checked as the values are not used.
} // namespace | ||
|
||
HALIDE_REGISTER_GENERATOR(AllTypeNamesGeneric, all_type_names_generic) | ||
HALIDE_REGISTER_GENERATOR_ALIAS(all_type_names, all_type_names_generic, {{"input_i8.type", "int8"}, {"input_i16.type", "int16"}, {"input_i32.type", "int32"}, {"input_i64.type", "int64"}, {"input_u8.type", "uint8"}, {"input_u16.type", "uint16"}, {"input_u32.type", "uint32"}, {"input_u64.type", "uint64"}, {"input_f16.type", "float16"}, {"input_f32.type", "float32"}, {"input_f64.type", "float64"}, {"input_bf16.type", "bfloat16"}, {"output.type", "float64"}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: looooooong line is long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had it very nicely formatted. The autoformat stuff said this is what it wants.
…nerator interface. (halide#7934) * Make sure all Halide arithmetic scalar types can be named from the Generator interface. Specifically adding 64-bit signed and unsigned integers and making sure float16 and bfloat16 are fully supported and documented. Add a simple test for all the type names. (Don't use float16 and bfloat16 in the arithmetic as they do not compile with the C++ backend. The name mapping should still be tested but the types passed do not seem to be checked as the values are not used.)
Specifically adding 64-bit signed and unsigned integers and making sure float16 and bfloat16 are fully supported and documented.
Add a simple test for all the type names.