Skip to content

Commit fad4275

Browse files
committed
fix sub check for alpha
1 parent f593ec9 commit fad4275

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dipu/scripts/autogen_diopi_wrapper/diopi_functions.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
at::native::sub_check(self, other);
8888
8989
if (is_scalar_on_cpu(other)) {
90+
at::native::alpha_check(self.scalar_type(), alpha);
9091
return dipu_sub_scalar(self, other.item(), alpha);
9192
}
9293
@@ -96,6 +97,7 @@
9697
dipu_fill__scalar(selfTmp, self.item());
9798
}
9899
100+
at::native::alpha_check(selfTmp.scalar_type(), alpha);
99101
at::Tensor out = BinaryOpInferrer().infer_out(selfTmp, other);
100102
101103
interface: diopiSub(ctx, out, selfTmp, other, alpha)

0 commit comments

Comments
 (0)