shiavm006 opened a new issue, #878:
URL: https://github.com/apache/mahout/issues/878
QDP’s Python binding currently rejects torch CUDA tensors and only supports
CPU tensors, forcing users to copy GPU→CPU→GPU (or failing). Add a CUDA-tensor
path that keeps data on GPU and runs encoding without host staging.
Current behavior
- Passing a torch CUDA tensor to `QdpEngine.encode(...)` raises an error
like:
- “Only CPU tensors are currently supported for this path…”
- Users must `.cpu()` first, which adds large overhead and breaks GPU-only
pipelines.
Expected behavior
- `QdpEngine.encode(torch_tensor_cuda, ...)` works for:
- 1D tensors (single sample)
- 2D tensors (batch)
- No GPU→CPU copy is required.
- Clear errors for unsupported cases (dtype, contiguity, device mismatch).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]