How do I pass in the `--gpu-architecture=compute_89` into a NVRTC kernel with CuPy?

43 Views Asked by At

cp.RawModule(code=kernel, backend='nvrtc', options=('--gpu-architecture=compute_89',))

When I try to do it like this, I get an error that the option has already been passed in. Do I have to build the library from source with the correct architecture in mind instead?

1

There are 1 best solutions below

0
kmaehashi On BEST ANSWER

CuPy automatically adds --gpu-architecture= option for the currently-active device, so you don't have to add it by yourself. Note that compute_89 support requires CUDA 11.8 or later.