Skip to content

Conversation

@sarnex
Copy link
Contributor

@sarnex sarnex commented Nov 19, 2024

lsc_usm_store_u32.cpp currently fails in syclos but passes in the internal compiler. The reason is that rand returns 0 and when sycl::bit_cast to float, it ends up as a very very small floating point number, like 1.4e-41. In the internal compiler, this gets optimized to zero, probably due to unsafe fp math optimizations. It is also zero on-device. In syclos the host remains as that small number and ends up screwing up the correctness check because we need 0.

Just explicitly return zero when the bit-casted result is below epsilon for the type.

@sarnex sarnex marked this pull request as ready for review November 19, 2024 22:39
@sarnex sarnex requested a review from a team as a code owner November 19, 2024 22:39
@sarnex sarnex merged commit 9e3aabf into intel:sycl Nov 20, 2024
13 checks passed
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.

2 participants