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

[HIP][libclc] Fix race in cmpxchg and change xor to use CAS instead of atomic builtin #11876

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

hdelan
Copy link
Contributor

@hdelan hdelan commented Nov 14, 2023

  1. Fix a race condition in cmpxchg
  2. Change atomic_xor to use a CAS loop instead of atomic builtin. This is needed to merge this in UR [HIP] Revert add prefetch for USM hip allocations a6b8fa66b537753415d24076f… oneapi-src/unified-runtime#936 so that perf regression can be fixed. The long term fix is to use a compiler flag to choose between builtin and safe CAS implementation, but talks upstream may take some time to figure out the details. See [AMDGPU] Add an option to disable unsafe uses of atomic xor llvm/llvm-project#69229

Copy link
Contributor

@JackAKirk JackAKirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hdelan
Copy link
Contributor Author

hdelan commented Nov 15, 2023

@intel/llvm-gatekeepers we would like to merge this soon if that's OK

@steffenlarsen
Copy link
Contributor

Windows CI build only failed in post-testing cleanup. Merging.

@steffenlarsen steffenlarsen merged commit c1ef658 into intel:sycl Nov 15, 2023
19 of 21 checks passed
@hdelan
Copy link
Contributor Author

hdelan commented Nov 15, 2023

Thanks @steffenlarsen !

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