It'd be nice if we move CUDA functionality into an extension so it's only loaded for CUDA-enabled devices. @vchuravy made a first attempt to do that at https://github.com/CliMA/Oceananigans.jl/pull/3066 similar effort but for AMDGPU is at https://github.com/CliMA/Oceananigans.jl/pull/3475