NVIDIA / cuda-python

CUDA Python Low-level Bindings
https://nvidia.github.io/cuda-python/
Other
859 stars 68 forks source link

What is the relationship between this and pycuda ? #18

Closed jinluyang closed 2 years ago

jinluyang commented 2 years ago

They seem similar. Except pycuda is not opensource and does not support cuda graph. This is just a question because I am a little confused.

shwina commented 2 years ago

Hi @jinluyang

First, PyCUDA is very much open source: https://github.com/inducer/pycuda

PyCUDA is a larger library, offering a Pythonic interface to the driver API, as well as higher level features such as GPU arrays and utilities for metaprogramming.

CUDA Python on the other hand exclusively provides Python bindings for the CUDA driver and runtime APIs.

So yes - there is definitely some overlap between the two. However CUDA Python is much more narrow and focused in its scope.

leofang commented 2 years ago

It's worth adding that PyCUDA is the ancestor of Python GPU programming. In particular, it showed the combination of

brings the full capability of CUDA to Python users. In a sense Numba, CuPy, and now CUDA Python are successors of it, specialized in each subdomain. I don't think it's exaggerating to say without PyCUDA's success it'd be slower to see the booming in growth of Python GPU users.

But, CUDA Python provides almost full coverage of the driver/runtime/NVRTC APIs, which is something none of the projects had the capacity to offer due to the wide scope. Also, CUDA Python is an official NVIDIA product 🙂