Skip to content

Commit f593ec9

Browse files
committed
fix bug
1 parent 44d5c85 commit f593ec9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dipu/scripts/autogen_diopi_wrapper/diopi_functions.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
- schema: "sub.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor"
8585
ins: [selfTmp]
8686
custom_code_at_the_beginning: |
87+
at::native::sub_check(self, other);
88+
8789
if (is_scalar_on_cpu(other)) {
8890
return dipu_sub_scalar(self, other.item(), alpha);
8991
}
@@ -94,7 +96,6 @@
9496
dipu_fill__scalar(selfTmp, self.item());
9597
}
9698
97-
at::native::sub_check(selfTmp, other);
9899
at::Tensor out = BinaryOpInferrer().infer_out(selfTmp, other);
99100
100101
interface: diopiSub(ctx, out, selfTmp, other, alpha)

0 commit comments

Comments
 (0)