Skip to content

Commit 5de4435

Browse files
committed
Convert scalar to the right type
1 parent 5d6d018 commit 5de4435

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torch_xla/csrc/xla_lower_util.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ xla::XlaOp BuildAddcdiv(xla::XlaOp input, xla::XlaOp t1, xla::XlaOp t2,
10201020

10211021
xla::XlaOp BuildAddcmul(xla::XlaOp input, xla::XlaOp t1, xla::XlaOp t2,
10221022
xla::XlaOp val) {
1023+
val = MaybeConvertTo(val, XlaHelpers::ShapeOfXlaOp(t1).element_type());
10231024
return XlaHelpers::PromotedAdd(
10241025
input, XlaHelpers::PromotedMul(XlaHelpers::PromotedMul(t1, t2), val));
10251026
}

0 commit comments

Comments
 (0)