viiccwen opened a new issue, #1003:
URL: https://github.com/apache/mahout/issues/1003

   ### Summary
   Extend QDP to support zero-copy angle encoding from float32 GPU pointers 
(e.g. PyTorch `torch.float32` CUDA tensors).
   
   - **Amplitude encoding** already has dedicated zero-copy APIs for float32 
GPU input: `QdpEngine::encode_from_gpu_ptr_f32` and 
`encode_from_gpu_ptr_f32_with_stream`. The Python bindings use these when the 
user passes a CUDA float32 tensor for amplitude encoding, avoiding host 
round-trips.
   - **Angle encoding** currently uses the generic `encode_from_gpu_ptr` / 
`encode_from_gpu_ptr_with_stream` path, which interprets the pointer as 
**float64**. When the user passes a float32 CUDA tensor for angle encoding, the 
current behavior is to fall back to CPU (e.g. “only supports 'amplitude', 
'angle', or 'basis' methods … Use tensor.cpu()”), forcing a device-to-host copy 
and losing zero-copy benefits.
   


-- 
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]

Reply via email to