Skip to content

Commit 44d5c85

Browse files
committed
replace sync call in sub
1 parent f1d1a60 commit 44d5c85

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
@@ -90,7 +90,8 @@
9090
9191
at::Tensor selfTmp = self;
9292
if (is_scalar_on_cpu(selfTmp)) {
93-
selfTmp = selfTmp.to(other.device());
93+
selfTmp = nodispatch::empty({1}, self.options().device(other.device()));
94+
dipu_fill__scalar(selfTmp, self.item());
9495
}
9596
9697
at::native::sub_check(selfTmp, other);

0 commit comments

Comments
 (0)