Skip to content

Conversation

@michel2323
Copy link
Member

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

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
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.10%. Comparing base (8c987b0) to head (88ee7ca).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/oneAPIKernels.jl 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@michel2323 michel2323 merged commit 0c9c8b7 into master Oct 31, 2025
2 checks passed
@michel2323 michel2323 deleted the ms/spirv_intrinsics branch October 31, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants