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

Validate device while initializing Tensor with an DLPack object #78

Open
jhalakpatel opened this issue Aug 9, 2024 · 1 comment
Open
Labels
enhancement New feature or request tripy Pull request for the tripy project

Comments

@jhalakpatel
Copy link
Collaborator

We allow a separate device field to be specified even when initializing Tripy Tensor with a DLPack object. Since Tripy Tensor must not perform any implicit copies, we assert if the device does not conform to the DLPack object data pointer device location. Once #72 is merged, we will not be performing such a check in the front-end.

There are three options:

  • Do not allow specifying the device field in the Tensor initializer if initializing with a DLPack object.
  • Add the check back to the Tripy front-end. This would need access to cupy as far as I can tell.
  • Add the check to MLIR-TensorRT. This should be trivial to add.
@jhalakpatel jhalakpatel added tripy Pull request for the tripy project enhancement New feature or request labels Aug 9, 2024
@jhalakpatel
Copy link
Collaborator Author

Based on some discussions, it is decided that we should drop device field in the Tensor initializer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tripy Pull request for the tripy project
Projects
None yet
Development

No branches or pull requests

1 participant