KernelAbstractions.jl
KernelAbstractions.jl copied to clipboard
CUDADevice not defined
I am unable to port my kernels to use KernelAbstraction.jl since CUDADevice is not defined after importing. eg.
using CUDA
using KernelAbstractions
CUDA.functional()
> true
device = CUDADevice()
> ERROR: UndefVarError: CUDADevice not defined
Note that CUDA works just fine. The versions I am currently using are: CUDA: 3.8.1 and KernelAbstractions: 0.8.0
You need to import CUDAKernels which contains the CUDA implementation of KernelAbstractions
Ok thank you. Should the documentation be updated to reflect this?
(It's not obvious in the docs that examples/utils.jl is importing this.
using CUDAKernels is on line 4 of examples/utils.jl: https://github.com/JuliaGPU/KernelAbstractions.jl/blob/master/examples/utils.jl#L4
it is also mentioned in the docs: https://github.com/JuliaGPU/KernelAbstractions.jl/blob/master/docs/src/index.md?plain=1#L57
Allegedly fixed according to https://github.com/JuliaGPU/KernelAbstractions.jl/pull/314#issuecomment-1182995831