Skip to content

Commit 9844952

Browse files
authored
[NPU]modify MaxPoolV3Grad bug in cann rc2 (#1415)
1 parent 45315d1 commit 9844952

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backends/npu/kernels/pool2d_kernel.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,18 @@ void AclopPool2dGradKernel(const Context& dev_ctx,
431431
cast_out_tensor = out_tensor;
432432
}
433433

434+
if (!FLAGS_npu_jit_compile) {
435+
aclSetCompileopt(ACL_OP_JIT_COMPILE, "enable");
436+
}
434437
const auto& runner =
435438
NpuOpRunner("MaxPoolV3Grad",
436439
{cast_in_x_tensor, cast_out_tensor, out_grad_cast_tensor},
437440
{in_x_grad_tmp_tensor},
438441
attrs); // 0: floor, 1: ceil
439442
runner.Run(dev_ctx.stream());
443+
if (!FLAGS_npu_jit_compile) {
444+
aclSetCompileopt(ACL_OP_JIT_COMPILE, "disable");
445+
}
440446
} else if (pooling_type == "avg") {
441447
NpuOpRunner runner;
442448
runner.SetType("AvgPoolV2Grad");

0 commit comments

Comments
 (0)