Skip to content

Move mapreduce fix from AK to oneAPI.jl - #558

Closed
michel2323 wants to merge 2 commits into
mainfrom
ms/ak_fix
Closed

michel2323 wants to merge 2 commits into
mainfrom
ms/ak_fix

Conversation

@michel2323

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

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/mapreduce.jl b/src/mapreduce.jl
index 809e2c6..3a9c317 100644
--- a/src/mapreduce.jl
+++ b/src/mapreduce.jl
@@ -1,13 +1,13 @@
 # On oneAPI, use the MapReduce algorithm by default as on some Intel GPUs ConcurrentWrite hangs
 # the device.
 function AK.any(
-    pred, v::AbstractArray, backend::oneAPIBackend;
+        pred, v::AbstractArray, backend::oneAPIBackend;
 
-    # Algorithm choice
-    alg::AK.PredicatesAlgorithm=AK.MapReduce(),
-    kwargs...
-)
-    AK._any_impl(
+        # Algorithm choice
+        alg::AK.PredicatesAlgorithm = AK.MapReduce(),
+        kwargs...
+    )
+    return AK._any_impl(
         pred, v, backend;
         alg,
         kwargs...
@@ -16,13 +16,13 @@ end
 
 
 function AK.all(
-    pred, v::AbstractArray, backend::oneAPIBackend;
+        pred, v::AbstractArray, backend::oneAPIBackend;
 
-    # Algorithm choice
-    alg::AK.PredicatesAlgorithm=AK.MapReduce(),
-    kwargs...
-)
-    AK._all_impl(
+        # Algorithm choice
+        alg::AK.PredicatesAlgorithm = AK.MapReduce(),
+        kwargs...
+    )
+    return AK._all_impl(
         pred, v, backend;
         alg,
         kwargs...

@michel2323

Copy link
Copy Markdown
Member Author

Closing: superseded by upstream direction in AcceleratedKernels.jl. The oneAPI extension there has since gained a _decoupled_fence device override (AK #116) and JuliaGPU/AcceleratedKernels.jl#133 moves further Intel-specific workarounds (scan block size, _supports_concurrent_write) into that extension rather than out of it. Keeping the any/all default in AK's oneAPIExt is the way forward, so this PR (and its counterpart JuliaGPU/AcceleratedKernels.jl#73) is no longer needed.

@michel2323 michel2323 closed this Sep 24, 2026
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.

1 participant