You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm considering trying to integrate acrotensor with PyTorch to use it in a model. It looks like it should be fairly trivial to create an acro::Tensor that references the GPU memory of some_pytorch_tensor.contiguous(); the only issue is Tensor.cpp:L192:
if (ddata != nullptr) {
ACROBATIC_ASSERT(hdata != nullptr, "Acrotensor does not currently support GPU only tensors.");
It seems to me reading the rest of Tensor.cpp that this isn't actually true — it seems like as long as you never try to move the Tensor back to host it should be fine — but I was hoping to confirm this.
If anyone has previously tried to integrate this with PyTorch or has any thoughts on that, I'd also be grateful to hear them.
Thanks for your work on this library!
The text was updated successfully, but these errors were encountered:
I obviously haven't looked at this in quite a while and had no idea folks were looking at it. I believe that should work as long as you don't call anything that needs the data on the host. Did you end up giving it a try?
It's also been a long time since I looked at this, but I did implement PyTorch bindings at one point, which I think worked fine with regard to this issue. The code is here if you are interested: https://github.com/Linux-cpp-lisp/acrotensor/tree/pytorch.
Hi all,
I'm considering trying to integrate acrotensor with PyTorch to use it in a model. It looks like it should be fairly trivial to create an
acro::Tensor
that references the GPU memory ofsome_pytorch_tensor.contiguous()
; the only issue is Tensor.cpp:L192:It seems to me reading the rest of
Tensor.cpp
that this isn't actually true — it seems like as long as you never try to move theTensor
back to host it should be fine — but I was hoping to confirm this.If anyone has previously tried to integrate this with PyTorch or has any thoughts on that, I'd also be grateful to hear them.
Thanks for your work on this library!
The text was updated successfully, but these errors were encountered: