Skip to content
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

Smaller fixups for "versioned" struct/docs and clarifications #145

Open
seberg opened this issue May 23, 2024 · 0 comments
Open

Smaller fixups for "versioned" struct/docs and clarifications #145

seberg opened this issue May 23, 2024 · 0 comments

Comments

@seberg
Copy link
Contributor

seberg commented May 23, 2024

When implementing things for NumPy, I noticed a few things:

  • All other structs are also typedef'd, the new ...Versioned is not.
  • In our discussions at some point we had a large comment in place for how far DLTensorVersioned is ABI stable. This is missing (i.e. we want everything up to and including the flags to be ABI stable, after that all bets are off for major versions).
  • When the major version changes, we may need a new struct. I am wondering if it might still make sense to just rip the band-aid off and remove dl_tensor from the ...Versioned struct and introduce a ...V1 which includes it.
    That would make it abundantly clear that you need to cast. If v2 doesn't need a new struct, could make it an alias or just document that?

On the Python side, copy=True and espeically copy=None behavior could be clarified. I did the lazy path in NumPy and just always copied with copy=True.
In very rare cases that might make an array exportable, which isn't without copy=True (due to odd strides).

It may make sense to clarify that copy=None is only required to do copies to make device requests work (if they are supported).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant