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


##########
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:
   Sorry, I didn’t explain this very clearly on my side.
   
   Currently, `validate_tensor` is only called at this 
[location](https://github.com/apache/mahout/pull/881/files#diff-2127e48c371dd5082474a4e975ac908065dc7b4a5736dfaa9f0efbfc95c8981aR535).
   The only thing `validate_tensor` does is call `is_pytorch_tensor`.
   Therefore, I don’t think it’s necessary to keep this function, since 
`is_pytorch_tensor` has already been called earlier in 
[here](https://github.com/apache/mahout/pull/881/files#diff-2127e48c371dd5082474a4e975ac908065dc7b4a5736dfaa9f0efbfc95c8981aR462).



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