Repository navigation
Adapt to GPUCompiler 2.13's atomics handling - #1147
Merged
Merged
Conversation
…cope. GPUCompiler 2.13 rejects atomics with synchronization scopes the GCN back-end doesn't know when validating the IR, so the test checking that such an atomic gets no memory assumptions failed to compile.
LLVM 22 couldn't select a native flat usub_sat on gfx10.3 and gfx11 with the memory assumptions (llvm/llvm-project#229442), so they were left off as an interim workaround. GPUCompiler 2.13 handles it: it requires the fixed AMDGPU_LLVM_Backend_jll and expands the operation for Julia's own LLVM, so require that version and treat usub_sat like the other operations.
Member
Author
|
Merging this a little quicker since this fixes main again. |
Contributor
AMDGPU.jl BenchmarksDetails
This comment was automatically generated by workflow using github-action-benchmark. |
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.
Follow-up to #1143, for GPUCompiler 2.13:
test/core/codegen.jlon main now errors on the test that checks an unknown scope gets no memory assumptions. That case is now compiled without IR validation.usub_sat, because LLVM 22 couldn't select the native instruction on gfx10.3 and gfx11 with them ([AMDGPU] Cannot select AtomicLoadUSubSat on LDS (gfx10.3/gfx11) and flat memory (gfx12, or with no.fine.grained.memory) llvm/llvm-project#229442). GPUCompiler 2.13 handles that: it requiresAMDGPU_LLVM_Backend_jll23.1.3, which has the fix, and expands the operation to a compare-and-swap loop for Julia's own LLVM 22+ (Validate atomics for the GCN target, and work around two LLVM atomic bugs GPUCompiler.jl#997). So this requires GPUCompiler 2.13 and treatsusub_satlike the other operations.Tested
core/codegenon Julia 1.13 (gfx1036 host, offline gfx1030/gfx90a code generation) with GPUCompiler 2.13.0 andAMDGPU_LLVM_Backend_jll23.1.3: main fails with one error, both commits pass.