Stream: helpdesk (published)

Topic: ✔ Package testing if GPU available


view this post on Zulip Dale Black (Oct 13 2021 at 20:12):

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?

view this post on Zulip Brian Chen (Oct 13 2021 at 22:20):

Flux uses CUDA.functional() for this: https://github.com/FluxML/Flux.jl/blob/c91867fd8cc49b19d90c88e0346db674cb757abd/test/runtests.jl#L30-L49

view this post on Zulip Dale Black (Oct 13 2021 at 23:12):

Thank you!

view this post on Zulip Notification Bot (Oct 18 2021 at 17:23):

Dale Black has marked this topic as resolved.


Last updated: Dec 28 2024 at 04:38 UTC