nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0
#pip install cupy-cudaXXX
pip install cupy-cuda12x
#또는
conda install -c conda-forge cupy cuda-version=12.0
import cupy as cp
x = cp.arange(6).reshape(2, 3)
print(x)
python cupytest.py
[[0 1 2]
[3 4 5]]