What’s state of the art for writing code with weak dependence on CUDA, e.g. when you want to provide automatic speedup if GPU is available, but provide fallback for systems with only CPUs? I remember a lot of discussion about it, but things seems to have been improved since the last time I checked it. In particular:
- Is it safe to add CuArrays and CUDAnative as dependencies to a general-purpose project if they are not loaded by default (e.g. when all calls to them are wrapped into
Requires.@required
)? - How to safely detect if CUDA is available in the system? Something like
@cuda_available
macro.