mirror of https://github.com/llvm/torch-mlir
[Torch] enhance fold of aten.alias (#3705)
parent
bb69014a96
commit
3f07077ff9
|
@ -3505,7 +3505,11 @@ atenBinaryFloatOperatorFoldHelper(ArrayRef<Attribute> operands,
|
|||
// AtenAliasOp
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
OpFoldResult AtenAliasOp::fold(FoldAdaptor adaptor) { return getOperand(); }
|
||||
OpFoldResult AtenAliasOp::fold(FoldAdaptor adaptor) {
|
||||
if (getOperand().getType() != getResult().getType())
|
||||
return {};
|
||||
return getOperand();
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// AtenFloordivIntOp
|
||||
|
|
Loading…
Reference in New Issue