Skip to content

Commit f88e97f

Browse files
committed
add local compiler preference
1 parent a79b516 commit f88e97f

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

CUDACore/lib/cudadrv/version.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ other tools. This is version separately from the CUDA Runtime, in order to ensur
100100
compatibility with the driver, and make sure we use the latest compatible version regardless
101101
of the selected runtime.
102102
"""
103-
compiler_version() = CUDA_Compiler_jll.cuda_version
103+
compiler_version() = CUDA_Compiler.cuda_version
104104

105105

106106
## helpers

CUDACore/src/CUDACore.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ using LLVMLoopInfo
3131

3232
using CUDA_Driver_jll
3333

34-
using CUDA_Compiler_jll
35-
3634
import CUDA_Runtime_jll
3735
const local_toolkit = CUDA_Runtime_jll.host_platform["cuda_local"] == "true"
3836
const toolkit_version = if CUDA_Runtime_jll.host_platform["cuda"] == "none"
@@ -49,6 +47,15 @@ else
4947
end
5048

5149
import Preferences
50+
const local_compiler = @load_preference("local_compiler", "false") == "true"
51+
52+
if local_compiler
53+
using CUDA_Runtime_Discovery
54+
const CUDA_Compiler = CUDA_Runtime_Discovery
55+
else
56+
using CUDA_Compiler_jll
57+
const CUDA_Compiler = CUDA_Compiler_jll
58+
end
5259

5360
using Libdl
5461

0 commit comments

Comments
 (0)