barry-jin commented on a change in pull request #20587:
URL: https://github.com/apache/incubator-mxnet/pull/20587#discussion_r726727743
##########
File path: src/common/cuda/rtc/backward_functions-inl.h
##########
@@ -426,6 +426,48 @@ copysign_grad(const DType val,
return (val >= 0 && val2 >= 0) || (val < 0 && val2 < 0) ? 1 : -1;
}
+template <typename DType, typename DType2>
+__device__ inline mixed_type<DType, DType2>
+bitwise_left_shift_grad(const DType val,
+ const DType2 val2) {
+ return op::power(static_cast<DType>(2), val2);
+}
+
+template <typename DType, typename DType2>
+__device__ inline mixed_type<DType, DType2>
+bitwise_left_shift_rgrad(const DType val,
+ const DType2 val2) {
+ return val * op::power(static_cast<DType>(2), val2) *
op::log(static_cast<type>(2));
Review comment:
I find that numpy operator tests in
https://github.com/apache/incubator-mxnet/blob/master/tests/python/gpu/test_operator_gpu.py#L41
is overrided by
https://github.com/apache/incubator-mxnet/blob/master/tests/python/gpu/test_numpy_op.py.
So, in this pr I also rename test_numpy_op.py in tests/python/gpu to
test_numpy_einsum.py.
--
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]