Skip to content

Commit

Permalink
Use a generic OpenCL ICD loader.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Apr 15, 2024
1 parent ef99d5b commit 9712b4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NEO_jll = "700fe977-ac61-5f37-bbc8-c6c4b2b6a9fd"
OpenCL_jll = "6cb37087-e8b6-5417-8430-1f242f1e46e4"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
7 changes: 4 additions & 3 deletions src/oneAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ using LLVM
using LLVM.Interop
using Core: LLVMPtr

using OpenCL_jll
using SPIRV_LLVM_Translator_unified_jll, SPIRV_Tools_jll

export oneL0
Expand Down Expand Up @@ -84,9 +85,9 @@ function __init__()
For the time being, it is recommended to use WSL or Linux instead."""
end

if Sys.islinux()
# ensure that the OpenCL runtime dispatcher finds the ICD files from our artifacts
ENV["OCL_ICD_VENDORS"] = oneL0.NEO_jll.libigdrcl
if oneL0.NEO_jll.is_available()
# ensure that the OpenCL loader finds the ICD files from our artifacts
ENV["OCL_ICD_FILENAMES"] = oneL0.NEO_jll.libigdrcl
end
end

Expand Down

0 comments on commit 9712b4b

Please sign in to comment.