-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
Over at Oceananingans, we had memory issues related to the fact that it seems that
KA.device!(backend, num)
does not switch to the intended device
MWE:
julia> using CUDA, KernelAbstractions
julia> KernelAbstractions.device!(CUDABackend(), 2)
julia> CUDA.device() # should be device number 1
CuDevice(0): NVIDIA TITAN V
This is because device!
is only defined for an Int32
https://github.com/JuliaGPU/CUDA.jl/blob/cd2ab1d22e36396b6a1141ee8782d182a5020087/src/CUDAKernels.jl#L67-L69
julia> KernelAbstractions.device!(CUDABackend(), Int32(2))
CuDevice(1): NVIDIA TITAN V
Why is this the case? Should we allow any integer? Or maybe a non-silent failure in case the device cannot be switched
Metadata
Metadata
Assignees
Labels
No labels