rich7420 commented on code in PR #930:
URL: https://github.com/apache/mahout/pull/930#discussion_r2730194140
##########
qdp/qdp-python/src/lib.rs:
##########
@@ -211,6 +212,23 @@ fn get_tensor_device_id(tensor: &Bound<'_, PyAny>) ->
PyResult<i32> {
Ok(device_index)
}
+/// Get the current CUDA stream pointer for the tensor's device.
+fn get_torch_cuda_stream_ptr(tensor: &Bound<'_, PyAny>) -> PyResult<*mut
c_void> {
Review Comment:
It seems here extracts a stream pointer from PyTorch but doesn't validate
that the stream is valid for the device or that it's not a null pointer in a
meaningful way. I think we could add validation or a defensive check here.
--
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]