add CUDA device check