ryankert01 commented on code in PR #881:
URL: https://github.com/apache/mahout/pull/881#discussion_r2708210622


##########
qdp/qdp-python/src/lib.rs:
##########
@@ -152,7 +152,7 @@ fn is_pytorch_tensor(obj: &Bound<'_, PyAny>) -> 
PyResult<bool> {
     Ok(module_name == "torch")
 }
 
-/// Helper to validate tensor
+/// Helper to validate CPU tensor
 fn validate_tensor(tensor: &Bound<'_, PyAny>) -> PyResult<()> {

Review Comment:
   Okay, got it. In `validate_tensor` has a part of it redundant as it rechecks 
`is_pytorch_tensor(tensor)`, but it can also catch catches MPS, XLA, HPU, etc. 
if any. 
   We can refactor it and remove `is_pytorch_tensor(tensor)` as a followup. and 
the function name probably should be renamed to `validate_tensor_cpu` or 
something.



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