The @assert CUDA.functional(true) currently returns an error if ParallelStencil is initialised with the CUDA GPU backend on a machine that does not have libcuda (no GPU available). This is problematic if ParallelStencil is used within another module and recompilation is triggered for various backends. This PR suggest to remove the @assert CUDA.functional(true) check. ParallelStencil can thus be initialised with the CUDA backend even if no CUDA install is available on the machine. The resulting code will fail during early runtime when CUDA.jl will try to locate libcuda producing a sufficient verbose error message:
┌ Error: Error during initialization of CUDA.jl
│ exception =
│ could not load library "libcuda"
│ dlopen(libcuda.dylib, 1): image not found
│ Stacktrace:
[...]
The
@assert CUDA.functional(true)
currently returns an error if ParallelStencil is initialised with the CUDA GPU backend on a machine that does not havelibcuda
(no GPU available). This is problematic if ParallelStencil is used within another module and recompilation is triggered for various backends. This PR suggest to remove the@assert CUDA.functional(true)
check. ParallelStencil can thus be initialised with the CUDA backend even if no CUDA install is available on the machine. The resulting code will fail during early runtime when CUDA.jl will try to locatelibcuda
producing a sufficient verbose error message: