Skip to content

Fix OpenCL positive and negative INF constants.#8266

Merged
alexreinking merged 3 commits intomainfrom
fix-8257
Jun 20, 2024
Merged

Fix OpenCL positive and negative INF constants.#8266
alexreinking merged 3 commits intomainfrom
fix-8257

Conversation

@alexreinking
Copy link
Copy Markdown
Member

Constructs the necessary constants from the Halide::float16_t bit masks.

Fixes #8257

@abadams
Copy link
Copy Markdown
Member

abadams commented Jun 5, 2024

Nice avoidance of new magic numbers.

Comment thread src/CodeGen_OpenCL_Dev.cpp Outdated
@alexreinking
Copy link
Copy Markdown
Member Author

The Vulkan errors here were fixed in #8259

@shoaibkamil
Copy link
Copy Markdown
Contributor

One thing that just occurred to me-- can you also modify test/correctness/gpu_f16_intrinsics.cpp to also run on OpenCL+CLHalf enabled? That should exercise these constants.

@alexreinking
Copy link
Copy Markdown
Member Author

One thing that just occurred to me-- can you also modify test/correctness/gpu_f16_intrinsics.cpp to also run on OpenCL+CLHalf enabled? That should exercise these constants.

Done -- let's see how the buildbots like it.

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.

OpenCL intrinsics for float16 seem to have neg_inf and inf switched

4 participants