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!
Dale Black has marked this topic as resolved.
Last updated: Nov 22 2024 at 04:41 UTC