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

[syclcompat][CUDA] FIX UB in test / seq_cst requires sm_70 on CUDA. #12575

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

JackAKirk
Copy link
Contributor

Fix UB in test by using a single thread task.

A shared USM variable was being simultaneously written to by multiple threads without using atomics. AFAIK this is generally not a well defined program, and was leading to invalid values.

seq_cst also requires sm_70 on CUDA, so the compilation invocation is updated to reflect this.
The CI device is >= sm_70 so it can use seq_cst. However this test did not compile for >=sm_70.

The CI device is >= sm_70 so can use seq_cst. However this test did not
compile for >=sm_70.
Test execution is also UB unless using a single_task.

Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
@JackAKirk JackAKirk requested a review from a team as a code owner February 1, 2024 11:49
@JackAKirk
Copy link
Contributor Author

JackAKirk commented Feb 1, 2024

See #12516 (comment) for details of the UB and its fix.
These tests are not fully executed unless the device supports seq_cst. Therefore they are tested in #12516 where I enabled seq_cst for cuda. The bindless images failure in #12516 is unrelated.

This PR is blocking #12516

@ldrumm ldrumm merged commit cf829e0 into intel:sycl Feb 2, 2024
12 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.

3 participants