-
-
Notifications
You must be signed in to change notification settings - Fork 327
array_api
usage for Buffer
#2199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ilan-gold This is a good discussion worth having. #1967 was meant to be a first pass at adding device support and it exposed many areas of the code that were relying implicitly on numpy and CPU backed arrays in general. In #1751, I proposed supporting both the I was not aware of
Given the current state of array library compliance, might it make sense to add an |
@akshaysubr I would say that sounds fine, but perhaps not keep the explicit I really think we should strive for one implementation - simpler, and if there are bugs, maybe we can upstream the fixes since array api should be a one-stop-shop! |
Also re: pytorch, I think it's ok if Alternatively we could make the buffer class customizable to the point where you have an array-api compliant array as the "base" buffer, and then we decorate all functions that return arrays to return a |
Discussed in #2197
Originally posted by ilan-gold September 17, 2024
Hello all,
I have been looking into the core code here (teehee) and I noticed the recent #1967. It made me wonder why
array_api
+ dlpack is not used for theBuffer
class (in general, and also specifically in that PR). I am guessing "no one has done it yet" is the answer, which is fair considering we all have other things going on, but then I am curious what #1967 gives thatarray_api
+ dlpack wouldn't.I think
cupy
,jax
(mentioned in the PR), andnumpy
all supportarray_api
if memory serves correctly.Sorry for the short question, with probably a long answer, but don't want to presume too much. I also did a quick search of the issues and found nothing relevant to the array api, but might have missed something: https://data-apis.org/array-api/latest/index.html
cc: @akshaysubr @madsbk @d-v-b @dcherian
The text was updated successfully, but these errors were encountered: