Skip to content

Commit ebdc4f0

Browse files
gchananfacebook-github-bot
authored andcommitted
Fix incorrect merge of #34136. (#36760)
Summary: Pull Request resolved: #36760 If you look at #34136, you will notice a commit (80c15c0) that didn't get merged. This is to address that, to avoid crashing on remainder when the rhs is 0. Test Plan: Imported from OSS Differential Revision: D21078776 Pulled By: gchanan fbshipit-source-id: 0ac138cbafac28cf8d696a2a413d3c542138cff9
1 parent 32bbf12 commit ebdc4f0

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

aten/src/ATen/native/cuda/BinaryArithmeticKernel.cu

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ void remainder_kernel_cuda(TensorIterator& iter) {
7070
AT_DISPATCH_INTEGRAL_TYPES(iter.dtype(), "remainder_cuda", [&]() {
7171
using thrust_t = typename ztype_cuda<scalar_t>::thrust_t;
7272
gpu_kernel_with_scalars(iter, []GPU_LAMBDA(thrust_t a, thrust_t b) -> thrust_t {
73-
CUDA_KERNEL_ASSERT(b != 0);
7473
thrust_t r = a % b;
7574
if ((r != 0) && ((r < 0) != (b < 0))) {
7675
r += b;

0 commit comments

Comments
 (0)