Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Yancey1989 committed Jul 21, 2023
1 parent a8f9a30 commit e868392
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tao_compiler/mlir/disc/transforms/codegen_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ Value emitNumElementsComputation(OpBuilder& b, Location loc, Operation* op) {
// only const rank is supported for now
assert(op->getDialect()->getNamespace() == "lmhlo");
int num_operands = op->getNumOperands();
if (isa<lmhlo::DynamicUpdateSliceOp>(op) && isInplaceOperator(op)) {
if (isa<lmhlo::DynamicUpdateSliceOp>(op) &&
op->getOperand(0) == op->getOperand(num_operands - 1)) {
return emitNumElementsComputation(b, loc, op->getOperand(1));
}
Value result_memref = op->getOperand(num_operands - 1);
Expand Down

0 comments on commit e868392

Please sign in to comment.