cupy / cupy

NumPy & SciPy for GPU
https://cupy.dev
MIT License
9.42k stars 846 forks source link

Doc: remove `__cuda_array_interface__` from PyTorch section in interoperability docs? #6062

Open kmaehashi opened 2 years ago

kmaehashi commented 2 years ago

https://docs.cupy.dev/en/latest/user_guide/interoperability.html#pytorch

The doc sounds like __cuda_array_interface__ is preferred over DLPack as it's mentioned first. I'd like to suggest DLPack as the first choice as __cuda_array_interface__ does not manage ownership.

leofang commented 2 years ago

I've been hoping to refactor this page. I think CAI and DLPack should be introduced as two separate sections, followed by examples of how they can be used for "CuPy + X". The current presentation was done at the time when DLPack was not yet the ideal solution.

I would not remove CAI completely because Numba/RAPIDS still relies on it, and Numba encourages users to use CAI to work with CuPy.