diff --git a/Project.toml b/Project.toml index bd0179c2..6c9cd5aa 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "oneAPI" uuid = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b" authors = ["Tim Besard ", "Alexis Montoison", "Michel Schanen "] -version = "2.6.0" +version = "2.6.1" [deps] AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" @@ -32,7 +32,7 @@ oneAPI_Support_jll = "b049733a-a71d-5ed3-8eba-7d323ac00b36" [compat] AbstractFFTs = "1.5.0" -AcceleratedKernels = "0.3.1, 0.4" +AcceleratedKernels = "0.4.3" Adapt = "4" CEnum = "0.4, 0.5" ExprTools = "0.1" diff --git a/src/accumulate.jl b/src/accumulate.jl index f893dc96..e196ded2 100644 --- a/src/accumulate.jl +++ b/src/accumulate.jl @@ -1,7 +1,3 @@ -import oneAPI -import oneAPI: oneArray, oneAPIBackend -import AcceleratedKernels as AK - # Accumulate operations using AcceleratedKernels Base.accumulate!(op, B::oneArray, A::oneArray; init = zero(eltype(A)), kwargs...) = AK.accumulate!(op, B, A, oneAPIBackend(); init, kwargs...) diff --git a/src/mapreduce.jl b/src/mapreduce.jl index fd1a2c71..809e2c69 100644 --- a/src/mapreduce.jl +++ b/src/mapreduce.jl @@ -1,3 +1,35 @@ +# 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; + + # Algorithm choice + alg::AK.PredicatesAlgorithm=AK.MapReduce(), + kwargs... +) + AK._any_impl( + pred, v, backend; + alg, + kwargs... + ) +end + + +function AK.all( + pred, v::AbstractArray, backend::oneAPIBackend; + + # Algorithm choice + alg::AK.PredicatesAlgorithm=AK.MapReduce(), + kwargs... +) + AK._all_impl( + pred, v, backend; + alg, + kwargs... + ) +end + + ## COV_EXCL_START # TODO diff --git a/src/oneAPI.jl b/src/oneAPI.jl index be0cc727..9b5de295 100644 --- a/src/oneAPI.jl +++ b/src/oneAPI.jl @@ -4,6 +4,7 @@ using GPUArrays using Adapt using GPUCompiler +import AcceleratedKernels as AK import ExprTools