Skip to content

Commit d2a7eb2

Browse files
michel2323lcw
authored andcommitted
Add has_oneapi()
1 parent e9dc8b9 commit d2a7eb2

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/environment.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,25 @@ function has_rocm()
374374
end
375375
end
376376

377+
"""
378+
MPI.has_oneapi()
379+
380+
Check if the MPI implementation is known to have oneAPI support.
381+
382+
This can be overridden by setting the `JULIA_MPI_HAS_ONEAPI` environment variable to `true`
383+
or `false`.
384+
385+
See also [`MPI.has_cuda`](@ref) and [`MPI.has_rocm`](@ref) for CUDA and ROCm support.
386+
"""
387+
function has_oneapi()
388+
flag = get(ENV, "JULIA_MPI_HAS_ONEAPI", nothing)
389+
if flag === nothing
390+
return false
391+
else
392+
return parse(Bool, flag)
393+
end
394+
end
395+
377396
"""
378397
MPI.has_gpu()
379398

0 commit comments

Comments
 (0)