Open abdulasiraj opened 1 year ago
Hi there,
I do believe this will be highly valuable feature to add these dunders for better cross platform dl acceleration
I'm interested in working on this issue and would appreciate mentorship. Could someone please guide me as I contribute to adding support for __dlpack__
and __dlpack_device__
to TensorFlow tensors
If so please mail me at prasanna0083@gmail.com as it will also boost me to contribute even more on the project!
Thank you, Prasanna
Hi @SuryanarayanaY,
Thanks for your response. I've gone through RFC and APIs. to_dlpack
and from_dlpack
are working very fine with tensorflow but now new array_api_standard is to support __dlpack__
and __dlpack_device__
dunder methods for tensors. details can be seen here:
https://dmlc.github.io/dlpack/latest/python_spec.html
https://data-apis.org/array-api/latest/API_specification/generated/array_api.array.__dlpack__.html
Torch and jax supports both functions as well as dunders but numpy only supports dunders, which means we can't consume tf capsule in numpy.
Issue type
Feature Request
Have you reproduced the bug with TensorFlow Nightly?
No
Source
source
TensorFlow version
tf 2.12.0
Custom code
Yes
OS platform and distribution
google colab
Mobile device
No response
Python version
3.10.12
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
it looks like tensorflow tesnors doesn't support
__dlpack__
and__dlpack_device__
dunders. Not sure, If it's already something down the road map. If not, can we add these dunders to tf tensors to conform array_api_standrads?Standalone code to reproduce the issue
Relevant log output