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

   ### Summary
   
   In `qdp/qdp-python/src/lib.rs`, the CUDA tensor device is validated in two 
places:
   
   - Via PyTorch APIs in `validate_cuda_tensor_for_encoding(...)`, which checks 
that the tensor device matches `QdpEngine`’s device.
   - Via DLPack metadata inside `extract_dlpack_tensor(...)`, which reads 
`dl_tensor.device.device_id` from the `DLManagedTensor`.
   
   Currently, there is no check that these two views of the device ID are 
consistent. If, for any reason (framework bug, interop change, or misuse), the 
PyTorch-validated device ID diverges from the DLPack `device_id`, this could 
lead to hard‑to‑debug failures (e.g., using memory from the wrong device).
   
   reference: 
[comment](https://github.com/apache/mahout/pull/814#discussion_r2719818904)


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