When developing packages that have portions that utilize CUDA.jl, is there a best practice way to write tests that test the GPU-specific functions if and only if a CUDA-enabled GPU is available?
Flux uses CUDA.functional()
for this: https://github.com/FluxML/Flux.jl/blob/c91867fd8cc49b19d90c88e0346db674cb757abd/test/runtests.jl#L30-L49
Thank you!
Last updated: Oct 02 2023 at 04:34 UTC