I get the below error when attempting to use CUDa.rand()
julia> using CUDA
julia> CUDA.rand()
ERROR: CURANDError: initialization of CUDA failed (code 203, CURAND_STATUS_INITIALIZATION_FAILED)
Stacktrace:
[1] throw_api_error(res::CUDA.CURAND.curandStatus)
@ CUDA.CURAND C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\error.jl:56
[2] macro expansion
@ C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\error.jl:69 [inlined]
[3] curandCreateGenerator(typ::CUDA.CURAND.curandRngType)
@ CUDA.CURAND C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\wrappers.jl:5
[4] CUDA.CURAND.RNG(typ::CUDA.CURAND.curandRngType; stream::CuStream)
@ CUDA.CURAND C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\random.jl:13
[5] RNG (repeats 2 times)
@ C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\random.jl:13 [inlined]
[6] #167
@ C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\CURAND.jl:38 [inlined]
[7] (::CUDA.APIUtils.var"#8#11"{CUDA.CURAND.var"#167#173", CUDA.APIUtils.HandleCache{CuContext, CUDA.CURAND.RNG}, CuContext})()
@ CUDA.APIUtils C:\Users\DIi.julia\packages\CUDA\BbliS\lib\utils\cache.jl:22
[8] lock(f::CUDA.APIUtils.var"#8#11"{CUDA.CURAND.var"#167#173", CUDA.APIUtils.HandleCache{CuContext, CUDA.CURAND.RNG}, CuContext}, l::ReentrantLock)
@ Base .\lock.jl:187
[9] check_cache
@ C:\Users\DIi.julia\packages\CUDA\BbliS\lib\utils\cache.jl:20 [inlined]
[10] pop!
@ C:\Users\DIi.julia\packages\CUDA\BbliS\lib\utils\cache.jl:41 [inlined]
[11] (::CUDA.CURAND.var"#new_state#172")(cuda::NamedTuple{(:device, :context, :stream, :math_mode, :math_precision), Tuple{CuDevice, CuContext, CuStream, CUDA.MathMode, Symbol}})
@ CUDA.CURAND C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\CURAND.jl:37
[12] #170
@ C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\CURAND.jl:51 [inlined]
[13] get!(default::CUDA.CURAND.var"#170#176"{CUDA.CURAND.var"#new_state#172", NamedTuple{(:device, :context, :stream, :math_mode, :math_precision), Tuple{CuDevice, CuContext, CuStream, CUDA.MathMode, Symbol}}}, h::Dict{CuContext, NamedTuple{(:rng,), Tuple{CUDA.CURAND.RNG}}}, key::CuContext)
@ Base .\dict.jl:465
[14] default_rng()
@ CUDA.CURAND C:\Users\DIi.julia\packages\CUDA\BbliS\lib\curand\CURAND.jl:50
[15] curand_rng
@ C:\Users\DIi.julia\packages\CUDA\BbliS\src\random.jl:262 [inlined]
[16] rand(::Type{Float32}, ::Int64)
@ CUDA C:\Users\DIi.julia\packages\CUDA\BbliS\src\random.jl:282
[17] rand(T::Type) (repeats 2 times)
@ CUDA C:\Users\DIi.julia\packages\CUDA\BbliS\src\random.jl:326
[18] top-level scope
@ REPL[4]:1
[19] top-level scope
@ C:\Users\DIi.julia\packages\CUDA\BbliS\src\initialization.jl:52
also CUDA.versioninfo() fails
julia> CUDA.versioninfo()
ERROR: CUDA error (code 103, UnknownMember)
Stacktrace:
[1] throw_api_error(res::CUDA.cudaError_enum)
@ CUDA C:\Users\DIi.julia\packages\CUDA\BbliS\lib\cudadrv\error.jl:89
[2] macro expansion
@ C:\Users\DIi.julia\packages\CUDA\BbliS\lib\cudadrv\error.jl:97 [inlined]
[3] runtime_version()
@ CUDA C:\Users\DIi.julia\packages\CUDA\BbliS\lib\cudadrv\version.jl:44
[4] versioninfo(io::Base.TTY) (repeats 2 times)
@ CUDA C:\Users\DIi.julia\packages\CUDA\BbliS\src\utilities.jl:32
[5] top-level scope
@ REPL[5]:1
[6] top-level scope
@ C:\Users\DIi.julia\packages\CUDA\BbliS\src\initialization.jl:52
But otherwise CUDA seems to work.
Any ideas what the issue could be? I have already tried searching the relevant codes (203 and 103) and found little by way of answers.
The machine:
OS Name Microsoft Windows 10 Enterprise Version 10.0.19044 Build 19044 Other OS Description Not Available System Manufacturer Dell Inc. System Model Precision 7740 System Type x64-based PC Processor Intel(R) Xeon(R) E-2276M CPU @ 2.80GHz, 2808 Mhz, 6 Core(s), 12 Logical Processor(s) Installed Physical Memory (RAM) 64.0 GB
Name NVIDIA Quadro RTX 4000 PNP Device ID PCI\VEN_10DE&DEV_1EB6&SUBSYS_09271028&REV_A1\4&F404CF9&0&0008 Adapter Type Quadro RTX 4000, NVIDIA compatible Adapter Description NVIDIA Quadro RTX 4000 Adapter RAM (1,048,576) bytes Driver Version 30.0.15.1006
Note: for whatever reason the the OS reports video RAM as being 1 GB (which matches the integrated Intel card). Nvitop, NVIDIA control panel, and CUDA.jl recognize there as being 8 GB as expected.