anko-intel commented on a change in pull request #20974:
URL: https://github.com/apache/incubator-mxnet/pull/20974#discussion_r833003345



##########
File path: src/operator/mshadow_op.h
##########
@@ -842,7 +842,10 @@ struct bitwise_right_shift : public mxnet_op::tunable {
         return DType(0);
       }
     }
-    return static_cast<int64_t>(a) >> static_cast<int64_t>(b);
+    if (std::is_same<DType, uint64_t>::value)

Review comment:
       Maybe we can just return "a >> b" when is_integral<Dtype>::value is 
equal true
   and "static_cast<int64_t>(a) >> static_cast<int64_t>(b)" otherwise.
   This way we can avoid conversion of short integral representation to longer 
one and made this implementation more efficient.
   




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