GPU-only Tensors
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 38
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
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 of `some_pytorch_tensor.contiguous()`; the only issue is [Tensor.cpp:L192](https://github.com/LLNL/acrotensor/blob/master/tensor/Tensor.cpp#L192):
```c++
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!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at tensor/Tensor.cpp line 192 and trace how tensor data is used when host data is absent. Check whether GPU-only tensors remain valid when they are never moved back to the host, and define done as confirming the behavior or identifying the additional changes needed to support it safely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100