-
Notifications
You must be signed in to change notification settings - Fork 29
Update SPIRVIntrinsics from 0.2 to 0.5 #542
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
Conversation
|
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 |
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:
|
No description provided.