Skip to content
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

Merged
merged 5 commits into from
Nov 7, 2023

Conversation

zvookin
Copy link
Member

@zvookin zvookin commented Nov 6, 2023

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.

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.
@zvookin
Copy link
Member Author

zvookin commented Nov 6, 2023

(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"}})
Copy link
Contributor

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

Copy link
Member Author

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.

@zvookin zvookin merged commit 3b4dc33 into main Nov 7, 2023
3 checks passed
@zvookin zvookin deleted the generator_64_bit_integers branch November 7, 2023 21:23
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
…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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants