Update SPIRVIntrinsics from 0.2 to 0.5#542
Merged
Merged
Conversation
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/array.jl b/src/array.jl
index d576cdb..3225b5e 100644
--- a/src/array.jl
+++ b/src/array.jl
@@ -279,8 +279,9 @@ end
## interop with GPU arrays
-function Base.unsafe_convert(::Type{oneDeviceArray{T,N,AS.CrossWorkgroup}}, a::oneArray{T,N}) where {T,N}
- oneDeviceArray{T,N,AS.CrossWorkgroup}(size(a), reinterpret(LLVMPtr{T,AS.CrossWorkgroup}, pointer(a)),
+function Base.unsafe_convert(::Type{oneDeviceArray{T, N, AS.CrossWorkgroup}}, a::oneArray{T, N}) where {T, N}
+ return oneDeviceArray{T, N, AS.CrossWorkgroup}(
+ size(a), reinterpret(LLVMPtr{T, AS.CrossWorkgroup}, pointer(a)),
a.maxsize - a.offset*Base.elsize(a))
end
diff --git a/src/compiler/execution.jl b/src/compiler/execution.jl
index 6503a9b..4900e77 100644
--- a/src/compiler/execution.jl
+++ b/src/compiler/execution.jl
@@ -88,7 +88,7 @@ Adapt.adapt_storage(to::KernelAdaptor, p::ZePtr{T}) where {T} = reinterpret(Ptr{
# convert oneAPI host arrays to device arrays
Adapt.adapt_storage(::KernelAdaptor, xs::oneArray{T,N}) where {T,N} =
- Base.unsafe_convert(oneDeviceArray{T,N,AS.CrossWorkgroup}, xs)
+ Base.unsafe_convert(oneDeviceArray{T, N, AS.CrossWorkgroup}, xs)
# Base.RefValue isn't GPU compatible, so provide a compatible alternative.
# TODO: port improvements from CUDA.jl
diff --git a/test/device/intrinsics.jl b/test/device/intrinsics.jl
index 5e5605e..e1991fd 100644
--- a/test/device/intrinsics.jl
+++ b/test/device/intrinsics.jl
@@ -226,7 +226,7 @@ end
s[t] = d[t]
s2[t] = 2*d[t]
- barrier(0)
+ barrier(0)
d[t] = s[tr]
return
@@ -252,7 +252,7 @@ end
s[t] = d[t]
s2[t] = d[t]
- barrier(0)
+ barrier(0)
d[t] = s[tr]
return |
This was referenced Oct 28, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #542 +/- ##
==========================================
+ Coverage 79.04% 79.10% +0.06%
==========================================
Files 47 47
Lines 3001 3001
==========================================
+ Hits 2372 2374 +2
+ Misses 629 627 -2 ☔ View full report in Codecov by Sentry. 🚀 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.
No description provided.