Replace deprecated __hip_atomic_* builtins with __scoped_atomic_* equivalents#4902
Open
srinivamd wants to merge 1 commit into
Open
Replace deprecated __hip_atomic_* builtins with __scoped_atomic_* equivalents#4902srinivamd wants to merge 1 commit into
srinivamd wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace deprecated
__hip_atomic_loadand__hip_atomic_compare_exchange_strongbuiltins inatomic.hppwith their non-deprecated equivalents__scoped_atomic_load_nand__scoped_atomic_compare_exchange, using__MEMORY_SCOPE_DEVICEinstead of__HIP_MEMORY_SCOPE_AGENT.Root cause: ROCm 7.14.0 HIP compiler deprecated the
__hip_atomic_*builtins. Because MIGraphX JIT-compiles GPU kernels with-Werror,-Whip-deprecated-builtins, the deprecation warnings become hard errors, causingscatter_mul(and any other operation using atomic CAS) to fail at runtime. This is a regression from ROCm 7.13.0 (PASS) to 7.14.0 (FAIL).Changes:
__hip_atomic_load→__scoped_atomic_load_n__hip_atomic_compare_exchange_strong→__scoped_atomic_compare_exchange__HIP_MEMORY_SCOPE_AGENT→__MEMORY_SCOPE_DEVICE#if __has_builtin(__scoped_atomic_load_n)/#elseguard for backward compatibility with ROCm 7.13.x and earlierFixes: ROCM-24855 —
test_verify_generalabort ontest_scatter_elements_mul_duplicate_indexTest plan
ctest -R test_verify_generalpasses on ROCm 7.14.0 (MI300/MI350)ctest -R test_verify_generalstill passes on ROCm 7.13.0 (backward compat)atomic.hpp