Make floating-point atomics work on the LLVM back-end path#595
Open
michel2323 wants to merge 3 commits into
Open
Make floating-point atomics work on the LLVM back-end path#595michel2323 wants to merge 3 commits into
michel2323 wants to merge 3 commits into
Conversation
Two pieces, without which oneAPI.atomic_add!/atomic_sub! on Float32
fail on discrete GPUs (4 errors in device/intrinsics on an Arc A750):
- use the SPIRVIntrinsics atomic-float-ops revision, whose atomic
intrinsics lower properly instead of falling back to an unsupported
runtime call ("unsupported call to an unknown function gpu_malloc");
- declare SPV_EXT_shader_atomic_float_add (and the relaxed-printf
extension) for the LLVM SPIR-V back-end: extensions must be declared
to permit the corresponding instructions during translation, and
without them the atomic float instructions fail to translate.
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/test/onemkl.jl b/test/onemkl.jl
index 4a4c7fc..518c179 100644
--- a/test/onemkl.jl
+++ b/test/onemkl.jl
@@ -14,7 +14,7 @@ k = 13
@testset "Version" begin
version_onemkl = oneMKL.version()
- @test version_onemkl ≥ v"2025.2.0"
+ @test version_onemkl ≥ v"2025.2.0"
end
############################################################################################ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #595 +/- ##
=======================================
Coverage 79.06% 79.06%
=======================================
Files 50 50
Lines 3362 3362
=======================================
Hits 2658 2658
Misses 704 704 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
On discrete GPUs (tested on an Arc A750, NEO 26.18),
oneAPI.atomic_add!/atomic_sub!onFloat32fail with 4 errors indevice/intrinsics: the atomic intrinsics fall back to an unsupported runtime call (unsupported call to an unknown function (call to gpu_malloc)). Two changes fix this:atomic-float-opsrevision, whose atomic intrinsics lower properly (pinned by commit SHA so the resolution is reproducible);SPV_EXT_shader_atomic_float_add(plus the relaxed-printf extension) for the LLVM SPIR-V back-end — extensions must be declared to permit the corresponding instructions during translation, and without the declaration the atomic float instructions fail withLLVM ERROR: The atomic float instruction requires the following SPIR-V extension: SPV_EXT_shader_atomic_float_add.Also relaxes the onemkl version test to accept oneMKL 2025.2+, so the suite works against a locally built support library (and the Aurora LTS toolchain, where this originates).
With this,
device/intrinsicspasses 116/116 andonemkl1048 + 48 broken on the A750. Extracted from the aurora-lts branch so it can land on main independently.