Skip to content

Instantly share code, notes, and snippets.

@cathyzhyi
Created May 5, 2022 15:52
Show Gist options
  • Save cathyzhyi/799fe7bece8d335cebb6bca677527ce9 to your computer and use it in GitHub Desktop.
Save cathyzhyi/799fe7bece8d335cebb6bca677527ce9 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
ninja: Entering directory `/usr/local/google/home/cathyzhyi/items/test/torch-mlir/build'
ninja: no work to do.
Args: /usr/local/google/home/cathyzhyi/items/test/torch-mlir/build/bin/torch-mlir-opt -pass-pipeline=torchscript-module-to-torch-backend-pipeline -mlir-print-ir-after-all -debug forward.mlir
Load new dialect in Context builtin
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SubElementTypeInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ShapedType)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemRefLayoutAttrInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SubElementAttrInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ElementsAttr)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SymbolOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpAsmOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionKindInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CastOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemoryEffectOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpAsmDialectInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::AffineBinaryOpExprStorage)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::AffineConstantExprStorage)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::AffineDimExprStorage)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::AffineMapStorage)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::IntegerSetStorage)
Load new dialect in Context builtin
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DebugActionManager::GenericHandler)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ZeroOperands<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneRegion<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ZeroResult<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ZeroSuccessor<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NoRegionArguments<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NoTerminator<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SingleBlock<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OpInvariants<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::AffineScope<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::IsIsolatedFromAbove<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SymbolTable<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SymbolOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpAsmOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionKindInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasOnlyGraphRegion<Empty>)
Load new dialect in Context torch
ImplicitTypeIDRegistry::lookupOrInsert(mlir::InferTypeOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SymbolUserOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionBranchOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionBranchTerminatorOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DialectInlinerInterface)
Load new dialect in Context func
Load new dialect in Context cf
Load new dialect in Context arith
ImplicitTypeIDRegistry::lookupOrInsert(mlir::VectorUnrollOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::bufferization::BufferizableOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::BranchOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CallOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CallableOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::FunctionOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::AutomaticAllocationScope<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CallableOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::FunctionOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ZeroRegion<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneResult<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::Type>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneOperand<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::VariadicOperands<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::func::FuncOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemoryEffectOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::MemRefsNormalizable<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ReturnLike<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::IsTerminator<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::FloatType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ConstantLike<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::InferTypeOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::BoolType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::DeviceType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::NoneType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::IntType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::AllowsTypeRefinement<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::ReadOnly<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<5>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::HasValueSemantics<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<2>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<6>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::ListType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<3>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<4>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::IsTrailingUnderscoreInplaceVariant<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::TupleType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SingleBlockImplicitTerminator<mlir::torch::Torch::ClassTypeTerminatorOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::torch::Torch::ClassTypeOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SymbolUserOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::StringType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::NnModuleType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SingleBlockImplicitTerminator<mlir::torch::Torch::NnModuleTerminatorOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::torch::Torch::NnModuleOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DataLayoutSpecInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::OpToOpPassAdaptor)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::PreservedAnalyses::AllAnalysesType)
// -----// IR Dump After SymbolDCE //----- //
module attributes {torch.debug_module_name = "forward"} {
func private @__torch__.torch.fx.graph_module.forward.__code_getter(%arg0: !torch.nn.Module<"__torch__.torch.fx.graph_module.forward">) -> !torch.str {
%1 = torch.prim.GetAttr %arg0["_code"] : !torch.nn.Module<"__torch__.torch.fx.graph_module.forward"> -> !torch.str
return %1 : !torch.str
}
func private @__torch__.torch.fx.graph_module.forward.forward(%arg0: !torch.nn.Module<"__torch__.torch.fx.graph_module.forward">, %arg1: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}, %arg2: !torch.tensor {torch.type_bound = !torch.vtensor<[3],f32>}, %arg3: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}) -> !torch.tuple<tensor, tensor> {
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true_0 = torch.constant.bool true
%false = torch.constant.bool false
%cpu = torch.constant.device "cpu"
%none_1 = torch.constant.none
%int6 = torch.constant.int 6
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%int3 = torch.constant.int 3
%1 = torch.aten.t %arg1 : !torch.tensor -> !torch.tensor
%2 = torch.aten.addmm %arg2, %arg3, %1, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%3 = torch.aten.sum %2, %none_1 : !torch.tensor, !torch.none -> !torch.tensor
%4 = torch.aten.ones_like %3, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%5 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%6 = torch.aten.expand %4, %5, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%7 = torch.aten.t %6 : !torch.tensor -> !torch.tensor
%8 = torch.aten.mm %7, %arg3 : !torch.tensor, !torch.tensor -> !torch.tensor
%9 = torch.aten.t %8 : !torch.tensor -> !torch.tensor
%10 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%11 = torch.aten.sum.dim_IntList %6, %10, %true_0, %none_1 : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%12 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%13 = torch.aten.view %11, %12 : !torch.tensor, !torch.list<int> -> !torch.tensor
%14 = torch.aten.detach %13 : !torch.tensor -> !torch.tensor
%15 = torch.aten.detach %14 : !torch.tensor -> !torch.tensor
%16 = torch.aten.t %9 : !torch.tensor -> !torch.tensor
%17 = torch.aten.detach %16 : !torch.tensor -> !torch.tensor
%18 = torch.aten.detach %17 : !torch.tensor -> !torch.tensor
%19 = torch.aten.add_.Tensor %arg2, %15, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%20 = torch.aten.add_.Tensor %arg1, %18, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%21 = torch.prim.TupleConstruct %20, %19 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
return %21 : !torch.tuple<tensor, tensor>
}
torch.class_type @__torch__.torch.fx.graph_module.forward {
torch.attr private "training" : !torch.bool
torch.attr private "_is_full_backward_hook" : !torch.optional<bool>
torch.attr private "_code" : !torch.str
torch.method private "__code_getter", @__torch__.torch.fx.graph_module.forward.__code_getter
torch.method "forward", @__torch__.torch.fx.graph_module.forward.forward
}
%true = torch.constant.bool true
%none = torch.constant.none
%str = torch.constant.str "\0A\0A\0Adef forward(self, params_1, params_2, args_1):\0A t = torch.ops.aten.t(params_1)\0A addmm = torch.ops.aten.addmm(params_2, args_1, t); t = None\0A sum_1 = torch.ops.aten.sum(addmm); addmm = None\0A ones_like = torch.ops.aten.ones_like(sum_1, dtype = 6, layout = 0, device = device(type='cpu'), pin_memory = False, memory_format = 1); sum_1 = None\0A expand = torch.ops.aten.expand(ones_like, [3, 3]); ones_like = None\0A t_1 = torch.ops.aten.t(expand)\0A mm = torch.ops.aten.mm(t_1, args_1); t_1 = args_1 = None\0A t_2 = torch.ops.aten.t(mm); mm = None\0A sum_2 = torch.ops.aten.sum(expand, [0], True); expand = None\0A view = torch.ops.aten.view(sum_2, [3]); sum_2 = None\0A detach = torch.ops.aten.detach(view); view = None\0A detach_1 = torch.ops.aten.detach(detach); detach = None\0A t_3 = torch.ops.aten.t(t_2); t_2 = None\0A detach_2 = torch.ops.aten.detach(t_3); t_3 = None\0A detach_3 = torch.ops.aten.detach(detach_2); detach_2 = None\0A add_ = torch.ops.aten.add_(params_2, detach_1, alpha = -0.01); params_2 = detach_1 = None\0A add__1 = torch.ops.aten.add_(params_1, detach_3, alpha = -0.01); params_1 = detach_3 = None\0A return (add__1, add_)\0A "
%0 = torch.nn_module {
torch.slot "training", %true : !torch.bool
torch.slot "_is_full_backward_hook", %none : !torch.none
torch.slot "_code", %str : !torch.str
} : !torch.nn.Module<"__torch__.torch.fx.graph_module.forward">
}
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DialectFoldInterface)
//===-------------------------------------------===//
Processing operation : 'torch.nn_module'(0x60f1ac0) {
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasRecursiveSideEffects<Empty>)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.nn_module_terminator'(0x6103f40) {
"torch.nn_module_terminator"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.slot'(0x60d78f0) {
"torch.slot"(%0) {name = "_code"} : (!torch.str) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.slot'(0x60f19d0) {
"torch.slot"(%1) {name = "_is_full_backward_hook"} : (!torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.slot'(0x6102cc0) {
"torch.slot"(%2) {name = "training"} : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6103cf0) {
%0 = "torch.constant.str"() {value = "\0A\0A\0Adef forward(self, params_1, params_2, args_1):\0A t = torch.ops.aten.t(params_1)\0A addmm = torch.ops.aten.addmm(params_2, args_1, t); t = None\0A sum_1 = torch.ops.aten.sum(addmm); addmm = None\0A ones_like = torch.ops.aten.ones_like(sum_1, dtype = 6, layout = 0, device = device(type='cpu'), pin_memory = False, memory_format = 1); sum_1 = None\0A expand = torch.ops.aten.expand(ones_like, [3, 3]); ones_like = None\0A t_1 = torch.ops.aten.t(expand)\0A mm = torch.ops.aten.mm(t_1, args_1); t_1 = args_1 = None\0A t_2 = torch.ops.aten.t(mm); mm = None\0A sum_2 = torch.ops.aten.sum(expand, [0], True); expand = None\0A view = torch.ops.aten.view(sum_2, [3]); sum_2 = None\0A detach = torch.ops.aten.detach(view); view = None\0A detach_1 = torch.ops.aten.detach(detach); detach = None\0A t_3 = torch.ops.aten.t(t_2); t_2 = None\0A detach_2 = torch.ops.aten.detach(t_3); t_3 = None\0A detach_3 = torch.ops.aten.detach(detach_2); detach_2 = None\0A add_ = torch.ops.aten.add_(params_2, detach_1, alpha = -0.01); params_2 = detach_1 = None\0A add__1 = torch.ops.aten.add_(params_1, detach_3, alpha = -0.01); params_1 = detach_3 = None\0A return (add__1, add_)\0A "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6103c00) {
%1 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6103b10) {
%2 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.class_type'(0x6103a10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.class_type_terminator'(0x60ec390) {
"torch.class_type_terminator"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.method'(0x6103410) {
"torch.method"() {function = @__torch__.torch.fx.graph_module.forward.forward, name = "forward"} : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.method'(0x6103920) {
"torch.method"() {function = @__torch__.torch.fx.graph_module.forward.__code_getter, isPrivate, name = "__code_getter"} : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.attr'(0x60ffe50) {
"torch.attr"() {isPrivate, name = "_code", type = !torch.str} : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.attr'(0x6101450) {
"torch.attr"() {isPrivate, name = "_is_full_backward_hook", type = !torch.optional<bool>} : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.attr'(0x60f0430) {
"torch.attr"() {isPrivate, name = "training", type = !torch.bool} : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.func'(0x61041a0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6104120) {
"func.return"(%33) : (!torch.tuple<tensor, tensor>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.TupleConstruct'(0x6104010) {
%33 = "torch.prim.TupleConstruct"(%32, %31) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::IsCommutative<Empty>)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x6103e80) {
%32 = "torch.aten.add_.Tensor"(%arg1, %30, %9) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x6103d50) {
%31 = "torch.aten.add_.Tensor"(%arg2, %27, %9) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6103c60) {
%30 = "torch.aten.detach"(%29) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6103b70) {
%29 = "torch.aten.detach"(%28) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6103a80) {
%28 = "torch.aten.t"(%21) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6103990) {
%27 = "torch.aten.detach"(%26) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x61038a0) {
%26 = "torch.aten.detach"(%25) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6103480) {
%25 = "torch.aten.view"(%23, %24) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6102d50) {
%24 = "torch.prim.ListConstruct"(%4) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x60b7630) {
%23 = "torch.aten.sum.dim_IntList"(%18, %22, %10, %8) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6102aa0) {
%22 = "torch.prim.ListConstruct"(%6) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x61014c0) {
%21 = "torch.aten.t"(%20) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x60ffec0) {
%20 = "torch.aten.mm"(%19, %arg3) : (!torch.tensor, !torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x60fe8e0) {
%19 = "torch.aten.t"(%18) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x60fd2c0) {
%18 = "torch.aten.expand"(%16, %17, %11) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x60fd1b0) {
%17 = "torch.prim.ListConstruct"(%4, %4) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x60fa710) {
%16 = "torch.aten.ones_like"(%15, %7, %6, %12, %11, %5) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x60fa4a0) {
%15 = "torch.aten.sum"(%14, %8) : (!torch.tensor, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x60436b0) {
%14 = "torch.aten.addmm"(%arg2, %arg3, %13, %5, %5) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x60ec310) {
%13 = "torch.aten.t"(%arg1) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f9db0) {
%4 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f7310) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f5c90) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f1d00) {
%7 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x60f1c40) {
%8 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x60f1b80) {
%12 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x60f1a60) {
%11 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x60f0490) {
%10 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x60debc0) {
%9 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.func'(0x60b75c0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60dc220) {
"func.return"(%4) : (!torch.str) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.GetAttr'(0x60dac60) {
%4 = "torch.prim.GetAttr"(%arg0) {name = "_code"} : (!torch.nn.Module<"__torch__.torch.fx.graph_module.forward">) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'builtin.module'(0x60b5570) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.str'(0x6103cf0) {
%0 = "torch.constant.str"() {value = "\0A\0A\0Adef forward(self, params_1, params_2, args_1):\0A t = torch.ops.aten.t(params_1)\0A addmm = torch.ops.aten.addmm(params_2, args_1, t); t = None\0A sum_1 = torch.ops.aten.sum(addmm); addmm = None\0A ones_like = torch.ops.aten.ones_like(sum_1, dtype = 6, layout = 0, device = device(type='cpu'), pin_memory = False, memory_format = 1); sum_1 = None\0A expand = torch.ops.aten.expand(ones_like, [3, 3]); ones_like = None\0A t_1 = torch.ops.aten.t(expand)\0A mm = torch.ops.aten.mm(t_1, args_1); t_1 = args_1 = None\0A t_2 = torch.ops.aten.t(mm); mm = None\0A sum_2 = torch.ops.aten.sum(expand, [0], True); expand = None\0A view = torch.ops.aten.view(sum_2, [3]); sum_2 = None\0A detach = torch.ops.aten.detach(view); view = None\0A detach_1 = torch.ops.aten.detach(detach); detach = None\0A t_3 = torch.ops.aten.t(t_2); t_2 = None\0A detach_2 = torch.ops.aten.detach(t_3); t_3 = None\0A detach_3 = torch.ops.aten.detach(detach_2); detach_2 = None\0A add_ = torch.ops.aten.add_(params_2, detach_1, alpha = -0.01); params_2 = detach_1 = None\0A add__1 = torch.ops.aten.add_(params_1, detach_3, alpha = -0.01); params_1 = detach_3 = None\0A return (add__1, add_)\0A "} : () -> !torch.str
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.none'(0x6103c00) {
%1 = "torch.constant.none"() : () -> !torch.none
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.bool'(0x6103b10) {
%2 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x60b75c0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.GetAttr'(0x60dac60) {
%4 = "torch.prim.GetAttr"(%arg0) {name = "_code"} : (!torch.nn.Module<"__torch__.torch.fx.graph_module.forward">) -> !torch.str
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x60dc220) {
"func.return"(%4) : (!torch.str) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x61041a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x60f9db0) {
%4 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x60f7310) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x60f5c90) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x60f1d00) {
%7 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.none'(0x60f1c40) {
%8 = "torch.constant.none"() : () -> !torch.none
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.float'(0x60debc0) {
%9 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.bool'(0x60f0490) {
%10 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.bool'(0x60f1a60) {
%11 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.device'(0x60f1b80) {
%12 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x60ec310) {
%13 = "torch.aten.t"(%arg1) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.addmm'(0x60436b0) {
%14 = "torch.aten.addmm"(%arg2, %arg3, %13, %5, %5) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.sum'(0x60fa4a0) {
%15 = "torch.aten.sum"(%14, %8) : (!torch.tensor, !torch.none) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.ones_like'(0x60fa710) {
%16 = "torch.aten.ones_like"(%15, %7, %6, %12, %11, %5) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x60fd1b0) {
%17 = "torch.prim.ListConstruct"(%4, %4) : (!torch.int, !torch.int) -> !torch.list<int>
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.expand'(0x60fd2c0) {
%18 = "torch.aten.expand"(%16, %17, %11) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x60fe8e0) {
%19 = "torch.aten.t"(%18) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.mm'(0x60ffec0) {
%20 = "torch.aten.mm"(%19, %arg3) : (!torch.tensor, !torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x61014c0) {
%21 = "torch.aten.t"(%20) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x6102aa0) {
%22 = "torch.prim.ListConstruct"(%6) : (!torch.int) -> !torch.list<int>
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.sum.dim_IntList'(0x60b7630) {
%23 = "torch.aten.sum.dim_IntList"(%18, %22, %10, %8) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x6102d50) {
%24 = "torch.prim.ListConstruct"(%4) : (!torch.int) -> !torch.list<int>
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.view'(0x6103480) {
%25 = "torch.aten.view"(%23, %24) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x61038a0) {
%26 = "torch.aten.detach"(%25) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6103990) {
%27 = "torch.aten.detach"(%26) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x6103a80) {
%28 = "torch.aten.t"(%21) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6103b70) {
%29 = "torch.aten.detach"(%28) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6103c60) {
%30 = "torch.aten.detach"(%29) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add_.Tensor'(0x6103d50) {
%31 = "torch.aten.add_.Tensor"(%arg2, %27, %9) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add_.Tensor'(0x6103e80) {
%32 = "torch.aten.add_.Tensor"(%arg1, %30, %9) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.TupleConstruct'(0x6104010) {
%33 = "torch.prim.TupleConstruct"(%32, %31) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x6104120) {
"func.return"(%33) : (!torch.tuple<tensor, tensor>) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.class_type'(0x6103a10) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.attr'(0x60f0430) {
"torch.attr"() {isPrivate, name = "training", type = !torch.bool} : () -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.attr'(0x6101450) {
"torch.attr"() {isPrivate, name = "_is_full_backward_hook", type = !torch.optional<bool>} : () -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.attr'(0x60ffe50) {
"torch.attr"() {isPrivate, name = "_code", type = !torch.str} : () -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.method'(0x6103920) {
"torch.method"() {function = @__torch__.torch.fx.graph_module.forward.__code_getter, isPrivate, name = "__code_getter"} : () -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.method'(0x6103410) {
"torch.method"() {function = @__torch__.torch.fx.graph_module.forward.forward, name = "forward"} : () -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.class_type_terminator'(0x60ec390) {
"torch.class_type_terminator"() : () -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.nn_module'(0x60f1ac0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.slot'(0x6102cc0) {
"torch.slot"(%2) {name = "training"} : (!torch.bool) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.slot'(0x60f19d0) {
"torch.slot"(%1) {name = "_is_full_backward_hook"} : (!torch.none) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.slot'(0x60d78f0) {
"torch.slot"(%0) {name = "_code"} : (!torch.str) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.nn_module_terminator'(0x6103f40) {
"torch.nn_module_terminator"() : () -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
// -----// IR Dump After PrepareForGlobalizeObjectGraph //----- //
module attributes {torch.debug_module_name = "forward"} {
%str = torch.constant.str "\0A\0A\0Adef forward(self, params_1, params_2, args_1):\0A t = torch.ops.aten.t(params_1)\0A addmm = torch.ops.aten.addmm(params_2, args_1, t); t = None\0A sum_1 = torch.ops.aten.sum(addmm); addmm = None\0A ones_like = torch.ops.aten.ones_like(sum_1, dtype = 6, layout = 0, device = device(type='cpu'), pin_memory = False, memory_format = 1); sum_1 = None\0A expand = torch.ops.aten.expand(ones_like, [3, 3]); ones_like = None\0A t_1 = torch.ops.aten.t(expand)\0A mm = torch.ops.aten.mm(t_1, args_1); t_1 = args_1 = None\0A t_2 = torch.ops.aten.t(mm); mm = None\0A sum_2 = torch.ops.aten.sum(expand, [0], True); expand = None\0A view = torch.ops.aten.view(sum_2, [3]); sum_2 = None\0A detach = torch.ops.aten.detach(view); view = None\0A detach_1 = torch.ops.aten.detach(detach); detach = None\0A t_3 = torch.ops.aten.t(t_2); t_2 = None\0A detach_2 = torch.ops.aten.detach(t_3); t_3 = None\0A detach_3 = torch.ops.aten.detach(detach_2); detach_2 = None\0A add_ = torch.ops.aten.add_(params_2, detach_1, alpha = -0.01); params_2 = detach_1 = None\0A add__1 = torch.ops.aten.add_(params_1, detach_3, alpha = -0.01); params_1 = detach_3 = None\0A return (add__1, add_)\0A "
%none = torch.constant.none
%true = torch.constant.bool true
func private @__torch__.torch.fx.graph_module.forward.__code_getter(%arg0: !torch.nn.Module<"__torch__.torch.fx.graph_module.forward">) -> !torch.str {
%1 = torch.prim.GetAttr %arg0["_code"] : !torch.nn.Module<"__torch__.torch.fx.graph_module.forward"> -> !torch.str
return %1 : !torch.str
}
func private @__torch__.torch.fx.graph_module.forward.forward(%arg0: !torch.nn.Module<"__torch__.torch.fx.graph_module.forward">, %arg1: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}, %arg2: !torch.tensor {torch.type_bound = !torch.vtensor<[3],f32>}, %arg3: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}) -> !torch.tuple<tensor, tensor> {
%int3 = torch.constant.int 3
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int6 = torch.constant.int 6
%none_0 = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true_1 = torch.constant.bool true
%false = torch.constant.bool false
%cpu = torch.constant.device "cpu"
%1 = torch.aten.t %arg1 : !torch.tensor -> !torch.tensor
%2 = torch.aten.addmm %arg2, %arg3, %1, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%3 = torch.aten.sum %2, %none_0 : !torch.tensor, !torch.none -> !torch.tensor
%4 = torch.aten.ones_like %3, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%5 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%6 = torch.aten.expand %4, %5, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%7 = torch.aten.t %6 : !torch.tensor -> !torch.tensor
%8 = torch.aten.mm %7, %arg3 : !torch.tensor, !torch.tensor -> !torch.tensor
%9 = torch.aten.t %8 : !torch.tensor -> !torch.tensor
%10 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%11 = torch.aten.sum.dim_IntList %6, %10, %true_1, %none_0 : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%12 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%13 = torch.aten.view %11, %12 : !torch.tensor, !torch.list<int> -> !torch.tensor
%14 = torch.aten.detach %13 : !torch.tensor -> !torch.tensor
%15 = torch.aten.detach %14 : !torch.tensor -> !torch.tensor
%16 = torch.aten.t %9 : !torch.tensor -> !torch.tensor
%17 = torch.aten.detach %16 : !torch.tensor -> !torch.tensor
%18 = torch.aten.detach %17 : !torch.tensor -> !torch.tensor
%19 = torch.aten.add_.Tensor %arg2, %15, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%20 = torch.aten.add_.Tensor %arg1, %18, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%21 = torch.prim.TupleConstruct %20, %19 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
return %21 : !torch.tuple<tensor, tensor>
}
torch.class_type @__torch__.torch.fx.graph_module.forward {
torch.attr private "training" : !torch.bool
torch.attr private "_is_full_backward_hook" : !torch.optional<bool>
torch.attr private "_code" : !torch.str
torch.method private "__code_getter", @__torch__.torch.fx.graph_module.forward.__code_getter
torch.method "forward", @__torch__.torch.fx.graph_module.forward.forward
}
%0 = torch.nn_module {
torch.slot "training", %true : !torch.bool
torch.slot "_is_full_backward_hook", %none : !torch.none
torch.slot "_code", %str : !torch.str
} : !torch.nn.Module<"__torch__.torch.fx.graph_module.forward">
}
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SingleBlockImplicitTerminator<mlir::torch::Torch::GlobalSlotInitOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::torch::Torch::GlobalSlotOp>::Impl<Empty>)
// -----// IR Dump After GlobalizeObjectGraph //----- //
module attributes {torch.debug_module_name = "forward"} {
torch.global_slot "private" @training : !torch.bool {
%true = torch.constant.bool true
torch.global_slot.init %true : !torch.bool
}
torch.global_slot "private" @_is_full_backward_hook : !torch.optional<bool> {
%none = torch.constant.none
torch.global_slot.init %none : !torch.none
}
torch.global_slot "private" @_code : !torch.str {
%str = torch.constant.str "\0A\0A\0Adef forward(self, params_1, params_2, args_1):\0A t = torch.ops.aten.t(params_1)\0A addmm = torch.ops.aten.addmm(params_2, args_1, t); t = None\0A sum_1 = torch.ops.aten.sum(addmm); addmm = None\0A ones_like = torch.ops.aten.ones_like(sum_1, dtype = 6, layout = 0, device = device(type='cpu'), pin_memory = False, memory_format = 1); sum_1 = None\0A expand = torch.ops.aten.expand(ones_like, [3, 3]); ones_like = None\0A t_1 = torch.ops.aten.t(expand)\0A mm = torch.ops.aten.mm(t_1, args_1); t_1 = args_1 = None\0A t_2 = torch.ops.aten.t(mm); mm = None\0A sum_2 = torch.ops.aten.sum(expand, [0], True); expand = None\0A view = torch.ops.aten.view(sum_2, [3]); sum_2 = None\0A detach = torch.ops.aten.detach(view); view = None\0A detach_1 = torch.ops.aten.detach(detach); detach = None\0A t_3 = torch.ops.aten.t(t_2); t_2 = None\0A detach_2 = torch.ops.aten.detach(t_3); t_3 = None\0A detach_3 = torch.ops.aten.detach(detach_2); detach_2 = None\0A add_ = torch.ops.aten.add_(params_2, detach_1, alpha = -0.01); params_2 = detach_1 = None\0A add__1 = torch.ops.aten.add_(params_1, detach_3, alpha = -0.01); params_1 = detach_3 = None\0A return (add__1, add_)\0A "
torch.global_slot.init %str : !torch.str
}
func private @__code_getter() -> !torch.str {
%0 = torch.global_slot.get @_code : !torch.str
return %0 : !torch.str
}
func @forward(%arg0: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}, %arg1: !torch.tensor {torch.type_bound = !torch.vtensor<[3],f32>}, %arg2: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}) -> !torch.tuple<tensor, tensor> {
%int3 = torch.constant.int 3
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%cpu = torch.constant.device "cpu"
%0 = torch.aten.t %arg0 : !torch.tensor -> !torch.tensor
%1 = torch.aten.addmm %arg1, %arg2, %0, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%2 = torch.aten.sum %1, %none : !torch.tensor, !torch.none -> !torch.tensor
%3 = torch.aten.ones_like %2, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%4 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%5 = torch.aten.expand %3, %4, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%6 = torch.aten.t %5 : !torch.tensor -> !torch.tensor
%7 = torch.aten.mm %6, %arg2 : !torch.tensor, !torch.tensor -> !torch.tensor
%8 = torch.aten.t %7 : !torch.tensor -> !torch.tensor
%9 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%10 = torch.aten.sum.dim_IntList %5, %9, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%11 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%12 = torch.aten.view %10, %11 : !torch.tensor, !torch.list<int> -> !torch.tensor
%13 = torch.aten.detach %12 : !torch.tensor -> !torch.tensor
%14 = torch.aten.detach %13 : !torch.tensor -> !torch.tensor
%15 = torch.aten.t %8 : !torch.tensor -> !torch.tensor
%16 = torch.aten.detach %15 : !torch.tensor -> !torch.tensor
%17 = torch.aten.detach %16 : !torch.tensor -> !torch.tensor
%18 = torch.aten.add_.Tensor %arg1, %14, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%19 = torch.aten.add_.Tensor %arg0, %17, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%20 = torch.prim.TupleConstruct %19, %18 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
return %20 : !torch.tuple<tensor, tensor>
}
}
// -----// IR Dump After SymbolDCE //----- //
module attributes {torch.debug_module_name = "forward"} {
func @forward(%arg0: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}, %arg1: !torch.tensor {torch.type_bound = !torch.vtensor<[3],f32>}, %arg2: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}) -> !torch.tuple<tensor, tensor> {
%int3 = torch.constant.int 3
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%cpu = torch.constant.device "cpu"
%0 = torch.aten.t %arg0 : !torch.tensor -> !torch.tensor
%1 = torch.aten.addmm %arg1, %arg2, %0, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%2 = torch.aten.sum %1, %none : !torch.tensor, !torch.none -> !torch.tensor
%3 = torch.aten.ones_like %2, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%4 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%5 = torch.aten.expand %3, %4, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%6 = torch.aten.t %5 : !torch.tensor -> !torch.tensor
%7 = torch.aten.mm %6, %arg2 : !torch.tensor, !torch.tensor -> !torch.tensor
%8 = torch.aten.t %7 : !torch.tensor -> !torch.tensor
%9 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%10 = torch.aten.sum.dim_IntList %5, %9, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%11 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%12 = torch.aten.view %10, %11 : !torch.tensor, !torch.list<int> -> !torch.tensor
%13 = torch.aten.detach %12 : !torch.tensor -> !torch.tensor
%14 = torch.aten.detach %13 : !torch.tensor -> !torch.tensor
%15 = torch.aten.t %8 : !torch.tensor -> !torch.tensor
%16 = torch.aten.detach %15 : !torch.tensor -> !torch.tensor
%17 = torch.aten.detach %16 : !torch.tensor -> !torch.tensor
%18 = torch.aten.add_.Tensor %arg1, %14, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%19 = torch.aten.add_.Tensor %arg0, %17, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%20 = torch.prim.TupleConstruct %19, %18 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
return %20 : !torch.tuple<tensor, tensor>
}
}
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CallGraph)
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%0 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f0490) {
%0 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%1 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%2 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125910) {
%3 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%0 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125970) {
%4 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125910) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x61259d0) {
%5 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x6125970) {
%0 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%6 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61259d0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a90) {
%7 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x6125af0) {
%8 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%9 = "torch.aten.t"(%arg0) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%10 = "torch.aten.addmm"(%arg1, %arg2, %9, %6, %6) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%11 = "torch.aten.sum"(%10, %3) : (!torch.tensor, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%12 = "torch.aten.ones_like"(%11, %4, %5, %8, %0, %6) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%13 = "torch.prim.ListConstruct"(%7, %7) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%14 = "torch.aten.expand"(%12, %13, %0) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125ca0) {
%15 = "torch.aten.t"(%14) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%16 = "torch.aten.mm"(%15, %arg2) : (!torch.tensor, !torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125d80) {
%17 = "torch.aten.t"(%16) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%18 = "torch.prim.ListConstruct"(%5) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%19 = "torch.aten.sum.dim_IntList"(%14, %18, %1, %3) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%20 = "torch.prim.ListConstruct"(%7) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6125f40) {
%21 = "torch.aten.view"(%19, %20) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6125fb0) {
%22 = "torch.aten.detach"(%21) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126020) {
%23 = "torch.aten.detach"(%22) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6126090) {
%24 = "torch.aten.t"(%17) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126100) {
%25 = "torch.aten.detach"(%24) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126170) {
%26 = "torch.aten.detach"(%25) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x61261e0) {
%27 = "torch.aten.add_.Tensor"(%arg1, %23, %2) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x6126250) {
%28 = "torch.aten.add_.Tensor"(%arg0, %26, %2) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.TupleConstruct'(0x61262c0) {
%29 = "torch.prim.TupleConstruct"(%28, %27) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6126320) {
"func.return"(%29) : (!torch.tuple<tensor, tensor>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61259d0) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x6125970) {
%2 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125910) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%4 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%5 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%6 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f0490) {
%7 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x6125af0) {
%8 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%9 = "torch.aten.t"(%arg0) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%10 = "torch.aten.addmm"(%arg1, %arg2, %9, %6, %6) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%11 = "torch.aten.sum"(%10, %3) : (!torch.tensor, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%12 = "torch.aten.ones_like"(%11, %4, %5, %8, %0, %6) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%13 = "torch.prim.ListConstruct"(%7, %7) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%14 = "torch.aten.expand"(%12, %13, %0) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125ca0) {
%15 = "torch.aten.t"(%14) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%16 = "torch.aten.mm"(%15, %arg2) : (!torch.tensor, !torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125d80) {
%17 = "torch.aten.t"(%16) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%18 = "torch.prim.ListConstruct"(%5) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%19 = "torch.aten.sum.dim_IntList"(%14, %18, %1, %3) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%20 = "torch.prim.ListConstruct"(%7) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6125f40) {
%21 = "torch.aten.view"(%19, %20) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6125fb0) {
%22 = "torch.aten.detach"(%21) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126020) {
%23 = "torch.aten.detach"(%22) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6126090) {
%24 = "torch.aten.t"(%17) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126100) {
%25 = "torch.aten.detach"(%24) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126170) {
%26 = "torch.aten.detach"(%25) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x61261e0) {
%27 = "torch.aten.add_.Tensor"(%arg1, %23, %2) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x6126250) {
%28 = "torch.aten.add_.Tensor"(%arg0, %26, %2) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.TupleConstruct'(0x61262c0) {
%29 = "torch.prim.TupleConstruct"(%28, %27) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6126320) {
"func.return"(%29) : (!torch.tuple<tensor, tensor>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func @forward(%arg0: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}, %arg1: !torch.tensor {torch.type_bound = !torch.vtensor<[3],f32>}, %arg2: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}) -> !torch.tuple<tensor, tensor> {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%int3 = torch.constant.int 3
%cpu = torch.constant.device "cpu"
%0 = torch.aten.t %arg0 : !torch.tensor -> !torch.tensor
%1 = torch.aten.addmm %arg1, %arg2, %0, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%2 = torch.aten.sum %1, %none : !torch.tensor, !torch.none -> !torch.tensor
%3 = torch.aten.ones_like %2, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%4 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%5 = torch.aten.expand %3, %4, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%6 = torch.aten.t %5 : !torch.tensor -> !torch.tensor
%7 = torch.aten.mm %6, %arg2 : !torch.tensor, !torch.tensor -> !torch.tensor
%8 = torch.aten.t %7 : !torch.tensor -> !torch.tensor
%9 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%10 = torch.aten.sum.dim_IntList %5, %9, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%11 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%12 = torch.aten.view %10, %11 : !torch.tensor, !torch.list<int> -> !torch.tensor
%13 = torch.aten.detach %12 : !torch.tensor -> !torch.tensor
%14 = torch.aten.detach %13 : !torch.tensor -> !torch.tensor
%15 = torch.aten.t %8 : !torch.tensor -> !torch.tensor
%16 = torch.aten.detach %15 : !torch.tensor -> !torch.tensor
%17 = torch.aten.detach %16 : !torch.tensor -> !torch.tensor
%18 = torch.aten.add_.Tensor %arg1, %14, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%19 = torch.aten.add_.Tensor %arg0, %17, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%20 = torch.prim.TupleConstruct %19, %18 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
return %20 : !torch.tuple<tensor, tensor>
}
// -----// IR Dump After Inliner //----- //
module attributes {torch.debug_module_name = "forward"} {
func @forward(%arg0: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}, %arg1: !torch.tensor {torch.type_bound = !torch.vtensor<[3],f32>}, %arg2: !torch.tensor {torch.type_bound = !torch.vtensor<[3,3],f32>}) -> !torch.tuple<tensor, tensor> {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%int3 = torch.constant.int 3
%cpu = torch.constant.device "cpu"
%0 = torch.aten.t %arg0 : !torch.tensor -> !torch.tensor
%1 = torch.aten.addmm %arg1, %arg2, %0, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%2 = torch.aten.sum %1, %none : !torch.tensor, !torch.none -> !torch.tensor
%3 = torch.aten.ones_like %2, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%4 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%5 = torch.aten.expand %3, %4, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%6 = torch.aten.t %5 : !torch.tensor -> !torch.tensor
%7 = torch.aten.mm %6, %arg2 : !torch.tensor, !torch.tensor -> !torch.tensor
%8 = torch.aten.t %7 : !torch.tensor -> !torch.tensor
%9 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%10 = torch.aten.sum.dim_IntList %5, %9, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%11 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%12 = torch.aten.view %10, %11 : !torch.tensor, !torch.list<int> -> !torch.tensor
%13 = torch.aten.detach %12 : !torch.tensor -> !torch.tensor
%14 = torch.aten.detach %13 : !torch.tensor -> !torch.tensor
%15 = torch.aten.t %8 : !torch.tensor -> !torch.tensor
%16 = torch.aten.detach %15 : !torch.tensor -> !torch.tensor
%17 = torch.aten.detach %16 : !torch.tensor -> !torch.tensor
%18 = torch.aten.add_.Tensor %arg1, %14, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%19 = torch.aten.add_.Tensor %arg0, %17, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%20 = torch.prim.TupleConstruct %19, %18 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
return %20 : !torch.tuple<tensor, tensor>
}
}
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x61256a0) {
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'func.func -> ()' {
Trying to match "(anonymous namespace)::AdjustCallingConventionForFunc"
"(anonymous namespace)::AdjustCallingConventionForFunc" result 1
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x61256a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
"builtin.module"() ({
"func.func"() ({
^bb0(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>):
%0 = "builtin.unrealized_conversion_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.tensor
%1 = "builtin.unrealized_conversion_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.tensor
%2 = "builtin.unrealized_conversion_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.tensor
%3 = "torch.constant.bool"() {value = false} : () -> !torch.bool
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
%5 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
%6 = "torch.constant.none"() : () -> !torch.none
%7 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
%8 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
%9 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
%10 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
%11 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
%12 = "torch.aten.t"(<<UNKNOWN SSA VALUE>>) : (!torch.tensor) -> !torch.tensor
%13 = "torch.aten.addmm"(<<UNKNOWN SSA VALUE>>, <<UNKNOWN SSA VALUE>>, %12, %9, %9) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
%14 = "torch.aten.sum"(%13, %6) : (!torch.tensor, !torch.none) -> !torch.tensor
%15 = "torch.aten.ones_like"(%14, %7, %8, %11, %3, %9) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
%16 = "torch.prim.ListConstruct"(%10, %10) : (!torch.int, !torch.int) -> !torch.list<int>
%17 = "torch.aten.expand"(%15, %16, %3) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
%18 = "torch.aten.t"(%17) : (!torch.tensor) -> !torch.tensor
%19 = "torch.aten.mm"(%18, <<UNKNOWN SSA VALUE>>) : (!torch.tensor, !torch.tensor) -> !torch.tensor
%20 = "torch.aten.t"(%19) : (!torch.tensor) -> !torch.tensor
%21 = "torch.prim.ListConstruct"(%8) : (!torch.int) -> !torch.list<int>
%22 = "torch.aten.sum.dim_IntList"(%17, %21, %4, %6) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
%23 = "torch.prim.ListConstruct"(%10) : (!torch.int) -> !torch.list<int>
%24 = "torch.aten.view"(%22, %23) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
%25 = "torch.aten.detach"(%24) : (!torch.tensor) -> !torch.tensor
%26 = "torch.aten.detach"(%25) : (!torch.tensor) -> !torch.tensor
%27 = "torch.aten.t"(%20) : (!torch.tensor) -> !torch.tensor
%28 = "torch.aten.detach"(%27) : (!torch.tensor) -> !torch.tensor
%29 = "torch.aten.detach"(%28) : (!torch.tensor) -> !torch.tensor
%30 = "torch.aten.add_.Tensor"(<<UNKNOWN SSA VALUE>>, %26, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
%31 = "torch.aten.add_.Tensor"(<<UNKNOWN SSA VALUE>>, %29, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
%32 = "torch.prim.TupleConstruct"(%31, %30) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
"func.return"(%32) : (!torch.tuple<tensor, tensor>) -> ()
}) {function_type = (!torch.vtensor<[3,3],f32>, !torch.vtensor<[3],f32>, !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor), sym_name = "forward"} : () -> ()
}) {torch.debug_module_name = "forward"} : () -> ()
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.bool'(0x6125a30) {
%3 = "torch.constant.bool"() {value = false} : () -> !torch.bool
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.bool'(0x61259d0) {
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.float'(0x6125970) {
%5 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.none'(0x6125910) {
%6 = "torch.constant.none"() : () -> !torch.none
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x61258b0) {
%7 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x6125850) {
%8 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x61257f0) {
%9 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x60f0490) {
%10 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.device'(0x6125af0) {
%11 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x611e9f0) {
%12 = "torch.aten.t"(<<UNKNOWN SSA VALUE>>) : (!torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.addmm'(0x6113a00) {
%13 = "torch.aten.addmm"(<<UNKNOWN SSA VALUE>>, <<UNKNOWN SSA VALUE>>, %12, %9, %9) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.sum'(0x6121990) {
%14 = "torch.aten.sum"(%13, %6) : (!torch.tensor, !torch.none) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.ones_like'(0x6125b50) {
%15 = "torch.aten.ones_like"(%14, %7, %8, %11, %3, %9) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%16 = "torch.prim.ListConstruct"(%10, %10) : (!torch.int, !torch.int) -> !torch.list<int>
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.expand'(0x6125c30) {
%17 = "torch.aten.expand"(%15, %16, %3) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x6125ca0) {
%18 = "torch.aten.t"(%17) : (!torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.mm'(0x6125d10) {
%19 = "torch.aten.mm"(%18, <<UNKNOWN SSA VALUE>>) : (!torch.tensor, !torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x6125d80) {
%20 = "torch.aten.t"(%19) : (!torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%21 = "torch.prim.ListConstruct"(%8) : (!torch.int) -> !torch.list<int>
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%22 = "torch.aten.sum.dim_IntList"(%17, %21, %4, %6) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%23 = "torch.prim.ListConstruct"(%10) : (!torch.int) -> !torch.list<int>
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.view'(0x6125f40) {
%24 = "torch.aten.view"(%22, %23) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6125fb0) {
%25 = "torch.aten.detach"(%24) : (!torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6126020) {
%26 = "torch.aten.detach"(%25) : (!torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x6126090) {
%27 = "torch.aten.t"(%20) : (!torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6126100) {
%28 = "torch.aten.detach"(%27) : (!torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6126170) {
%29 = "torch.aten.detach"(%28) : (!torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add_.Tensor'(0x61261e0) {
%30 = "torch.aten.add_.Tensor"(<<UNKNOWN SSA VALUE>>, %26, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add_.Tensor'(0x6126250) {
%31 = "torch.aten.add_.Tensor"(<<UNKNOWN SSA VALUE>>, %29, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.TupleConstruct'(0x61262c0) {
%32 = "torch.prim.TupleConstruct"(%31, %30) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x6126320) {
"func.return"(%32) : (!torch.tuple<tensor, tensor>) -> ()
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'func.return -> ()' {
Trying to match "(anonymous namespace)::AdjustCallingConventionForReturn"
** Insert : 'torch.constant.int'(0x6125a90)
** Insert : 'torch.prim.TupleIndex'(0x60fa4a0)
** Insert : 'torch.constant.int'(0x60f1a60)
** Insert : 'torch.prim.TupleIndex'(0x60fd1b0)
** Insert : 'func.return'(0x60e2ae0)
** Replace : 'func.return'(0x6126320)
"(anonymous namespace)::AdjustCallingConventionForReturn" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x6125a90) {
%33 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.TupleIndex'(0x60fa4a0) {
%34 = "torch.prim.TupleIndex"(%32, %33) : (!torch.tuple<tensor, tensor>, !torch.int) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x60f1a60) {
%35 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.TupleIndex'(0x60fd1b0) {
%36 = "torch.prim.TupleIndex"(%32, %35) : (!torch.tuple<tensor, tensor>, !torch.int) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x60e2ae0) {
"func.return"(%34, %36) : (!torch.tensor, !torch.tensor) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
"func.func"() ({
^bb0(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>):
%0 = "builtin.unrealized_conversion_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.tensor
%1 = "builtin.unrealized_conversion_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.tensor
%2 = "builtin.unrealized_conversion_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.tensor
%3 = "torch.constant.bool"() {value = false} : () -> !torch.bool
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
%5 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
%6 = "torch.constant.none"() : () -> !torch.none
%7 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
%8 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
%9 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
%10 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
%11 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
%12 = "torch.aten.t"(<<UNKNOWN SSA VALUE>>) : (!torch.tensor) -> !torch.tensor
%13 = "torch.aten.addmm"(<<UNKNOWN SSA VALUE>>, <<UNKNOWN SSA VALUE>>, %12, %9, %9) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
%14 = "torch.aten.sum"(%13, %6) : (!torch.tensor, !torch.none) -> !torch.tensor
%15 = "torch.aten.ones_like"(%14, %7, %8, %11, %3, %9) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
%16 = "torch.prim.ListConstruct"(%10, %10) : (!torch.int, !torch.int) -> !torch.list<int>
%17 = "torch.aten.expand"(%15, %16, %3) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
%18 = "torch.aten.t"(%17) : (!torch.tensor) -> !torch.tensor
%19 = "torch.aten.mm"(%18, <<UNKNOWN SSA VALUE>>) : (!torch.tensor, !torch.tensor) -> !torch.tensor
%20 = "torch.aten.t"(%19) : (!torch.tensor) -> !torch.tensor
%21 = "torch.prim.ListConstruct"(%8) : (!torch.int) -> !torch.list<int>
%22 = "torch.aten.sum.dim_IntList"(%17, %21, %4, %6) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
%23 = "torch.prim.ListConstruct"(%10) : (!torch.int) -> !torch.list<int>
%24 = "torch.aten.view"(%22, %23) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
%25 = "torch.aten.detach"(%24) : (!torch.tensor) -> !torch.tensor
%26 = "torch.aten.detach"(%25) : (!torch.tensor) -> !torch.tensor
%27 = "torch.aten.t"(%20) : (!torch.tensor) -> !torch.tensor
%28 = "torch.aten.detach"(%27) : (!torch.tensor) -> !torch.tensor
%29 = "torch.aten.detach"(%28) : (!torch.tensor) -> !torch.tensor
%30 = "torch.aten.add_.Tensor"(<<UNKNOWN SSA VALUE>>, %26, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
%31 = "torch.aten.add_.Tensor"(<<UNKNOWN SSA VALUE>>, %29, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
%32 = "torch.prim.TupleConstruct"(%31, %30) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
%33 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
%34 = "torch.prim.TupleIndex"(%32, %33) : (!torch.tuple<tensor, tensor>, !torch.int) -> !torch.tensor
%35 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
%36 = "torch.prim.TupleIndex"(%32, %35) : (!torch.tuple<tensor, tensor>, !torch.int) -> !torch.tensor
"func.return"(%34, %36) : (!torch.tensor, !torch.tensor) -> ()
"func.return"(%32) : (!torch.tuple<tensor, tensor>) -> ()
}) {function_type = (!torch.vtensor<[3,3],f32>, !torch.vtensor<[3],f32>, !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor), sym_name = "forward"} : () -> ()
} -> SUCCESS
//===-------------------------------------------===//
** Insert : 'torch.tensor_static_info_cast'(0x6103b70)
** Insert : 'torch.copy.to_tensor'(0x6103c60)
** Insert : 'torch.tensor_static_info_cast'(0x60dac60)
** Insert : 'torch.copy.to_tensor'(0x610f7d0)
** Insert : 'torch.tensor_static_info_cast'(0x6134650)
** Insert : 'torch.copy.to_tensor'(0x61346e0)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CastOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::NonValueTensorType>::Impl<Empty>)
// -----// IR Dump After AdjustCallingConventions //----- //
module attributes {torch.debug_module_name = "forward"} {
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%int3 = torch.constant.int 3
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.aten.addmm %3, %5, %6, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%8 = torch.aten.sum %7, %none : !torch.tensor, !torch.none -> !torch.tensor
%9 = torch.aten.ones_like %8, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%10 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%11 = torch.aten.expand %9, %10, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%12 = torch.aten.t %11 : !torch.tensor -> !torch.tensor
%13 = torch.aten.mm %12, %5 : !torch.tensor, !torch.tensor -> !torch.tensor
%14 = torch.aten.t %13 : !torch.tensor -> !torch.tensor
%15 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%16 = torch.aten.sum.dim_IntList %11, %15, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%17 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%18 = torch.aten.view %16, %17 : !torch.tensor, !torch.list<int> -> !torch.tensor
%19 = torch.aten.detach %18 : !torch.tensor -> !torch.tensor
%20 = torch.aten.detach %19 : !torch.tensor -> !torch.tensor
%21 = torch.aten.t %14 : !torch.tensor -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.aten.detach %22 : !torch.tensor -> !torch.tensor
%24 = torch.aten.add_.Tensor %3, %20, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%25 = torch.aten.add_.Tensor %1, %23, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%26 = torch.prim.TupleConstruct %25, %24 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
%int0_0 = torch.constant.int 0
%27 = torch.prim.TupleIndex %26, %int0_0 : !torch.tuple<tensor, tensor>, !torch.int -> !torch.tensor
%int1_1 = torch.constant.int 1
%28 = torch.prim.TupleIndex %26, %int1_1 : !torch.tuple<tensor, tensor>, !torch.int -> !torch.tensor
return %27, %28 : !torch.tensor, !torch.tensor
}
}
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6134650) {
%0 = "torch.tensor_static_info_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61346e0) {
%1 = "torch.copy.to_tensor"(%0) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x60dac60) {
%2 = "torch.tensor_static_info_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x610f7d0) {
%3 = "torch.copy.to_tensor"(%2) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6103b70) {
%4 = "torch.tensor_static_info_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x6103c60) {
%5 = "torch.copy.to_tensor"(%4) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%6 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6103840) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61259d0) {
%7 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x6125970) {
%8 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x61259d0) {
%0 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125910) {
%9 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125970) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%10 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125910) {
%0 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%11 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%12 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f0490) {
%13 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%0 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x6125af0) {
%14 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%15 = "torch.aten.t"(%9) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%16 = "torch.aten.addmm"(%11, %13, %15, %1, %1) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%17 = "torch.aten.sum"(%16, %4) : (!torch.tensor, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%18 = "torch.aten.ones_like"(%17, %3, %2, %14, %7, %1) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%19 = "torch.prim.ListConstruct"(%0, %0) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%20 = "torch.aten.expand"(%18, %19, %7) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125ca0) {
%21 = "torch.aten.t"(%20) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%22 = "torch.aten.mm"(%21, %13) : (!torch.tensor, !torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125d80) {
%23 = "torch.aten.t"(%22) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%24 = "torch.prim.ListConstruct"(%2) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%25 = "torch.aten.sum.dim_IntList"(%20, %24, %6, %4) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%26 = "torch.prim.ListConstruct"(%0) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6125f40) {
%27 = "torch.aten.view"(%25, %26) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6125fb0) {
%28 = "torch.aten.detach"(%27) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126020) {
%29 = "torch.aten.detach"(%28) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6126090) {
%30 = "torch.aten.t"(%23) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126100) {
%31 = "torch.aten.detach"(%30) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126170) {
%32 = "torch.aten.detach"(%31) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x61261e0) {
%33 = "torch.aten.add_.Tensor"(%11, %29, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x6126250) {
%34 = "torch.aten.add_.Tensor"(%9, %32, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.TupleConstruct'(0x61262c0) {
%35 = "torch.prim.TupleConstruct"(%34, %33) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125a90) {
%36 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.TupleIndex'(0x60fa4a0) {
%36 = "torch.prim.TupleIndex"(%35, %0) : (!torch.tuple<tensor, tensor>, !torch.int) -> !torch.tensor
* Pattern : 'torch.prim.TupleIndex -> ()' {
Trying to match ""
** Replace : 'torch.prim.TupleIndex'(0x60fa4a0)
"" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int1 = torch.constant.int 1
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.aten.addmm %3, %5, %6, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%8 = torch.aten.sum %7, %none : !torch.tensor, !torch.none -> !torch.tensor
%9 = torch.aten.ones_like %8, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%10 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%11 = torch.aten.expand %9, %10, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%12 = torch.aten.t %11 : !torch.tensor -> !torch.tensor
%13 = torch.aten.mm %12, %5 : !torch.tensor, !torch.tensor -> !torch.tensor
%14 = torch.aten.t %13 : !torch.tensor -> !torch.tensor
%15 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%16 = torch.aten.sum.dim_IntList %11, %15, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%17 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%18 = torch.aten.view %16, %17 : !torch.tensor, !torch.list<int> -> !torch.tensor
%19 = torch.aten.detach %18 : !torch.tensor -> !torch.tensor
%20 = torch.aten.detach %19 : !torch.tensor -> !torch.tensor
%21 = torch.aten.t %14 : !torch.tensor -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.aten.detach %22 : !torch.tensor -> !torch.tensor
%24 = torch.aten.add_.Tensor %3, %20, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%25 = torch.aten.add_.Tensor %1, %23, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%26 = torch.prim.TupleConstruct %25, %24 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
%int1_0 = torch.constant.int 1
%27 = torch.prim.TupleIndex %26, %int1_0 : !torch.tuple<tensor, tensor>, !torch.int -> !torch.tensor
return %25, %27 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f1a60) {
%36 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.TupleIndex'(0x60fd1b0) {
%36 = "torch.prim.TupleIndex"(%35, %0) : (!torch.tuple<tensor, tensor>, !torch.int) -> !torch.tensor
* Pattern : 'torch.prim.TupleIndex -> ()' {
Trying to match ""
** Replace : 'torch.prim.TupleIndex'(0x60fd1b0)
"" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.aten.addmm %3, %5, %6, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%8 = torch.aten.sum %7, %none : !torch.tensor, !torch.none -> !torch.tensor
%9 = torch.aten.ones_like %8, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%10 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%11 = torch.aten.expand %9, %10, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%12 = torch.aten.t %11 : !torch.tensor -> !torch.tensor
%13 = torch.aten.mm %12, %5 : !torch.tensor, !torch.tensor -> !torch.tensor
%14 = torch.aten.t %13 : !torch.tensor -> !torch.tensor
%15 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%16 = torch.aten.sum.dim_IntList %11, %15, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%17 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%18 = torch.aten.view %16, %17 : !torch.tensor, !torch.list<int> -> !torch.tensor
%19 = torch.aten.detach %18 : !torch.tensor -> !torch.tensor
%20 = torch.aten.detach %19 : !torch.tensor -> !torch.tensor
%21 = torch.aten.t %14 : !torch.tensor -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.aten.detach %22 : !torch.tensor -> !torch.tensor
%24 = torch.aten.add_.Tensor %3, %20, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%25 = torch.aten.add_.Tensor %1, %23, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%26 = torch.prim.TupleConstruct %25, %24 : !torch.tensor, !torch.tensor -> !torch.tuple<tensor, tensor>
return %25, %24 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.TupleConstruct'(0x61262c0) {
%35 = "torch.prim.TupleConstruct"(%34, %33) : (!torch.tensor, !torch.tensor) -> !torch.tuple<tensor, tensor>
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60e2ae0) {
"func.return"(%34, %33) : (!torch.tensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemoryEffects::Allocate)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SideEffects::DefaultResource)
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%2 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125910) {
%3 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125970) {
%4 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x61259d0) {
%5 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%6 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6103840) {
%7 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6134650) {
%8 = "torch.tensor_static_info_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61346e0) {
%9 = "torch.copy.to_tensor"(%8) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x60dac60) {
%10 = "torch.tensor_static_info_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x610f7d0) {
%11 = "torch.copy.to_tensor"(%10) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6103b70) {
%12 = "torch.tensor_static_info_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x6103c60) {
%13 = "torch.copy.to_tensor"(%12) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x6125af0) {
%14 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%15 = "torch.aten.t"(%9) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%16 = "torch.aten.addmm"(%11, %13, %15, %0, %0) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%17 = "torch.aten.sum"(%16, %4) : (!torch.tensor, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%18 = "torch.aten.ones_like"(%17, %3, %1, %14, %7, %0) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%19 = "torch.prim.ListConstruct"(%2, %2) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%20 = "torch.aten.expand"(%18, %19, %7) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125ca0) {
%21 = "torch.aten.t"(%20) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%22 = "torch.aten.mm"(%21, %13) : (!torch.tensor, !torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125d80) {
%23 = "torch.aten.t"(%22) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%24 = "torch.prim.ListConstruct"(%1) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%25 = "torch.aten.sum.dim_IntList"(%20, %24, %6, %4) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%26 = "torch.prim.ListConstruct"(%2) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6125f40) {
%27 = "torch.aten.view"(%25, %26) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6125fb0) {
%28 = "torch.aten.detach"(%27) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126020) {
%29 = "torch.aten.detach"(%28) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6126090) {
%30 = "torch.aten.t"(%23) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126100) {
%31 = "torch.aten.detach"(%30) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126170) {
%32 = "torch.aten.detach"(%31) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x61261e0) {
%33 = "torch.aten.add_.Tensor"(%11, %29, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add_.Tensor'(0x6126250) {
%34 = "torch.aten.add_.Tensor"(%9, %32, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60e2ae0) {
"func.return"(%34, %33) : (!torch.tensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.aten.addmm %3, %5, %6, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%8 = torch.aten.sum %7, %none : !torch.tensor, !torch.none -> !torch.tensor
%9 = torch.aten.ones_like %8, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%10 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%11 = torch.aten.expand %9, %10, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%12 = torch.aten.t %11 : !torch.tensor -> !torch.tensor
%13 = torch.aten.mm %12, %5 : !torch.tensor, !torch.tensor -> !torch.tensor
%14 = torch.aten.t %13 : !torch.tensor -> !torch.tensor
%15 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%16 = torch.aten.sum.dim_IntList %11, %15, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%17 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%18 = torch.aten.view %16, %17 : !torch.tensor, !torch.list<int> -> !torch.tensor
%19 = torch.aten.detach %18 : !torch.tensor -> !torch.tensor
%20 = torch.aten.detach %19 : !torch.tensor -> !torch.tensor
%21 = torch.aten.t %14 : !torch.tensor -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.aten.detach %22 : !torch.tensor -> !torch.tensor
%24 = torch.aten.add_.Tensor %3, %20, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%25 = torch.aten.add_.Tensor %1, %23, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %25, %24 : !torch.tensor, !torch.tensor
}
// -----// IR Dump After InlineGlobalSlots //----- //
module attributes {torch.debug_module_name = "forward"} {
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.aten.addmm %3, %5, %6, %int1, %int1 : !torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int -> !torch.tensor
%8 = torch.aten.sum %7, %none : !torch.tensor, !torch.none -> !torch.tensor
%9 = torch.aten.ones_like %8, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%10 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%11 = torch.aten.expand %9, %10, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%12 = torch.aten.t %11 : !torch.tensor -> !torch.tensor
%13 = torch.aten.mm %12, %5 : !torch.tensor, !torch.tensor -> !torch.tensor
%14 = torch.aten.t %13 : !torch.tensor -> !torch.tensor
%15 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%16 = torch.aten.sum.dim_IntList %11, %15, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%17 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%18 = torch.aten.view %16, %17 : !torch.tensor, !torch.list<int> -> !torch.tensor
%19 = torch.aten.detach %18 : !torch.tensor -> !torch.tensor
%20 = torch.aten.detach %19 : !torch.tensor -> !torch.tensor
%21 = torch.aten.t %14 : !torch.tensor -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.aten.detach %22 : !torch.tensor -> !torch.tensor
%24 = torch.aten.add_.Tensor %3, %20, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%25 = torch.aten.add_.Tensor %1, %23, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %25, %24 : !torch.tensor, !torch.tensor
}
}
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x61256a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x6125850) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x61258b0) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x61257f0) {
%2 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x6125910) {
%3 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.none'(0x6125970) {
%4 = "torch.constant.none"() : () -> !torch.none
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.float'(0x61259d0) {
%5 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.bool'(0x6125a30) {
%6 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.bool'(0x6103840) {
%7 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.tensor_static_info_cast'(0x6134650) {
%8 = "torch.tensor_static_info_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x61346e0) {
%9 = "torch.copy.to_tensor"(%8) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.tensor_static_info_cast'(0x60dac60) {
%10 = "torch.tensor_static_info_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x610f7d0) {
%11 = "torch.copy.to_tensor"(%10) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.tensor_static_info_cast'(0x6103b70) {
%12 = "torch.tensor_static_info_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x6103c60) {
%13 = "torch.copy.to_tensor"(%12) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.device'(0x6125af0) {
%14 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x611e9f0) {
%15 = "torch.aten.t"(%9) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.addmm'(0x6113a00) {
%16 = "torch.aten.addmm"(%11, %13, %15, %0, %0) : (!torch.tensor, !torch.tensor, !torch.tensor, !torch.int, !torch.int) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.addmm -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Insert : 'torch.copy.to_vtensor'(0x6126e80)
** Insert : 'torch.copy.to_vtensor'(0x6126f10)
** Insert : 'torch.copy.to_vtensor'(0x6103a80)
** Insert : 'torch.copy.to_tensor'(0x6103990)
"(anonymous namespace)::ConvertToImmutableTensors" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.addmm'(0x6113a00) {
%19 = "torch.aten.addmm"(%16, %17, %18, %0, %0) : (!torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x6126e80) {
%16 = "torch.copy.to_vtensor"(%11) : (!torch.tensor) -> !torch.vtensor
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::ValueTensorType>::Impl<Empty>)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x6126f10) {
%17 = "torch.copy.to_vtensor"(%13) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x6103a80) {
%18 = "torch.copy.to_vtensor"(%15) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x6103990) {
%20 = "torch.copy.to_tensor"(%19) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.aten.sum %11, %none : !torch.tensor, !torch.none -> !torch.tensor
%13 = torch.aten.ones_like %12, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%14 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%15 = torch.aten.expand %13, %14, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%16 = torch.aten.t %15 : !torch.tensor -> !torch.tensor
%17 = torch.aten.mm %16, %5 : !torch.tensor, !torch.tensor -> !torch.tensor
%18 = torch.aten.t %17 : !torch.tensor -> !torch.tensor
%19 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%20 = torch.aten.sum.dim_IntList %15, %19, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%21 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%22 = torch.aten.view %20, %21 : !torch.tensor, !torch.list<int> -> !torch.tensor
%23 = torch.aten.detach %22 : !torch.tensor -> !torch.tensor
%24 = torch.aten.detach %23 : !torch.tensor -> !torch.tensor
%25 = torch.aten.t %18 : !torch.tensor -> !torch.tensor
%26 = torch.aten.detach %25 : !torch.tensor -> !torch.tensor
%27 = torch.aten.detach %26 : !torch.tensor -> !torch.tensor
%28 = torch.aten.add_.Tensor %3, %24, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%29 = torch.aten.add_.Tensor %1, %27, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %29, %28 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.sum'(0x6121990) {
%21 = "torch.aten.sum"(%20, %4) : (!torch.tensor, !torch.none) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.sum -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Insert : 'torch.copy.to_vtensor'(0x61038a0)
** Insert : 'torch.copy.to_tensor'(0x61a5eb0)
"(anonymous namespace)::ConvertToImmutableTensors" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.sum'(0x6121990) {
%22 = "torch.aten.sum"(%21, %4) : (!torch.vtensor, !torch.none) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61038a0) {
%21 = "torch.copy.to_vtensor"(%20) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x61a5eb0) {
%23 = "torch.copy.to_tensor"(%22) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.aten.ones_like %14, %int6, %int0, %cpu, %false, %int1 : !torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.tensor
%16 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%17 = torch.aten.expand %15, %16, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%18 = torch.aten.t %17 : !torch.tensor -> !torch.tensor
%19 = torch.aten.mm %18, %5 : !torch.tensor, !torch.tensor -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%22 = torch.aten.sum.dim_IntList %17, %21, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%23 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%24 = torch.aten.view %22, %23 : !torch.tensor, !torch.list<int> -> !torch.tensor
%25 = torch.aten.detach %24 : !torch.tensor -> !torch.tensor
%26 = torch.aten.detach %25 : !torch.tensor -> !torch.tensor
%27 = torch.aten.t %20 : !torch.tensor -> !torch.tensor
%28 = torch.aten.detach %27 : !torch.tensor -> !torch.tensor
%29 = torch.aten.detach %28 : !torch.tensor -> !torch.tensor
%30 = torch.aten.add_.Tensor %3, %26, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%31 = torch.aten.add_.Tensor %1, %29, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %31, %30 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.ones_like'(0x6125b50) {
%24 = "torch.aten.ones_like"(%23, %3, %1, %14, %7, %0) : (!torch.tensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.ones_like -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Insert : 'torch.copy.to_vtensor'(0x61a6050)
** Insert : 'torch.copy.to_tensor'(0x61a68d0)
"(anonymous namespace)::ConvertToImmutableTensors" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.ones_like'(0x6125b50) {
%25 = "torch.aten.ones_like"(%24, %3, %1, %14, %7, %0) : (!torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a6050) {
%24 = "torch.copy.to_vtensor"(%23) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x61a68d0) {
%26 = "torch.copy.to_tensor"(%25) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.aten.mm %20, %5 : !torch.tensor, !torch.tensor -> !torch.tensor
%22 = torch.aten.t %21 : !torch.tensor -> !torch.tensor
%23 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%24 = torch.aten.sum.dim_IntList %19, %23, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%25 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%26 = torch.aten.view %24, %25 : !torch.tensor, !torch.list<int> -> !torch.tensor
%27 = torch.aten.detach %26 : !torch.tensor -> !torch.tensor
%28 = torch.aten.detach %27 : !torch.tensor -> !torch.tensor
%29 = torch.aten.t %22 : !torch.tensor -> !torch.tensor
%30 = torch.aten.detach %29 : !torch.tensor -> !torch.tensor
%31 = torch.aten.detach %30 : !torch.tensor -> !torch.tensor
%32 = torch.aten.add_.Tensor %3, %28, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%33 = torch.aten.add_.Tensor %1, %31, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %33, %32 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%27 = "torch.prim.ListConstruct"(%2, %2) : (!torch.int, !torch.int) -> !torch.list<int>
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.expand'(0x6125c30) {
%28 = "torch.aten.expand"(%26, %27, %7) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x6125ca0) {
%29 = "torch.aten.t"(%28) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.mm'(0x6125d10) {
%30 = "torch.aten.mm"(%29, %13) : (!torch.tensor, !torch.tensor) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.mm -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Insert : 'torch.copy.to_vtensor'(0x61a6960)
** Insert : 'torch.copy.to_vtensor'(0x61a6140)
** Insert : 'torch.copy.to_tensor'(0x61a69f0)
"(anonymous namespace)::ConvertToImmutableTensors" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.mm'(0x6125d10) {
%32 = "torch.aten.mm"(%30, %31) : (!torch.vtensor, !torch.vtensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a6960) {
%30 = "torch.copy.to_vtensor"(%29) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a6140) {
%31 = "torch.copy.to_vtensor"(%13) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x61a69f0) {
%33 = "torch.copy.to_tensor"(%32) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.aten.sum.dim_IntList %19, %26, %true, %none : !torch.tensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.tensor
%28 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%29 = torch.aten.view %27, %28 : !torch.tensor, !torch.list<int> -> !torch.tensor
%30 = torch.aten.detach %29 : !torch.tensor -> !torch.tensor
%31 = torch.aten.detach %30 : !torch.tensor -> !torch.tensor
%32 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.detach %33 : !torch.tensor -> !torch.tensor
%35 = torch.aten.add_.Tensor %3, %31, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%36 = torch.aten.add_.Tensor %1, %34, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %36, %35 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x6125d80) {
%34 = "torch.aten.t"(%33) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%35 = "torch.prim.ListConstruct"(%1) : (!torch.int) -> !torch.list<int>
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%36 = "torch.aten.sum.dim_IntList"(%28, %35, %6, %4) : (!torch.tensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.sum.dim_IntList -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Insert : 'torch.copy.to_vtensor'(0x61a9950)
** Insert : 'torch.copy.to_tensor'(0x61a99e0)
"(anonymous namespace)::ConvertToImmutableTensors" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%37 = "torch.aten.sum.dim_IntList"(%36, %35, %6, %4) : (!torch.vtensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a9950) {
%36 = "torch.copy.to_vtensor"(%28) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x61a99e0) {
%38 = "torch.copy.to_tensor"(%37) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.aten.add_.Tensor %3, %33, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%38 = torch.aten.add_.Tensor %1, %36, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %38, %37 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%39 = "torch.prim.ListConstruct"(%2) : (!torch.int) -> !torch.list<int>
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.view'(0x6125f40) {
%40 = "torch.aten.view"(%38, %39) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6125fb0) {
%41 = "torch.aten.detach"(%40) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6126020) {
%42 = "torch.aten.detach"(%41) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.t'(0x6126090) {
%43 = "torch.aten.t"(%34) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6126100) {
%44 = "torch.aten.detach"(%43) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.detach'(0x6126170) {
%45 = "torch.aten.detach"(%44) : (!torch.tensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add_.Tensor'(0x61261e0) {
%46 = "torch.aten.add_.Tensor"(%11, %42, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.add_.Tensor -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Failure : does not have value semantics
"(anonymous namespace)::ConvertToImmutableTensors" result 0
} -> FAILURE : pattern failed to match
* Pattern : 'torch.aten.add_.Tensor -> ()' {
Trying to match "(anonymous namespace)::ReduceTrailingUnderscoreInplaceVariant"
** Insert : 'torch.aten.add.Tensor'(0x61a4990)
** Insert : 'torch.copy.to_vtensor'(0x61a97b0)
** Insert : 'torch.overwrite.tensor.contents'(0x61a6220)
** Replace : 'torch.aten.add_.Tensor'(0x61261e0)
"(anonymous namespace)::ReduceTrailingUnderscoreInplaceVariant" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add.Tensor'(0x61a4990) {
%46 = "torch.aten.add.Tensor"(%11, %42, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.add.Tensor -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Insert : 'torch.copy.to_vtensor'(0x61a7030)
** Insert : 'torch.copy.to_vtensor'(0x61a70c0)
** Insert : 'torch.copy.to_tensor'(0x61a7150)
"(anonymous namespace)::ConvertToImmutableTensors" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add.Tensor'(0x61a4990) {
%48 = "torch.aten.add.Tensor"(%46, %47, %5) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a7030) {
%46 = "torch.copy.to_vtensor"(%11) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a70c0) {
%47 = "torch.copy.to_vtensor"(%42) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x61a7150) {
%49 = "torch.copy.to_tensor"(%48) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%40 = torch.copy.to_tensor %39 : !torch.tensor
%41 = torch.copy.to_vtensor %40 : !torch.vtensor
torch.overwrite.tensor.contents %41 overwrites %3 : !torch.vtensor, !torch.tensor
%42 = torch.aten.add_.Tensor %3, %33, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%43 = torch.aten.add_.Tensor %1, %36, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %43, %42 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a97b0) {
%50 = "torch.copy.to_vtensor"(%49) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.overwrite.tensor.contents'(0x61a6220) {
"torch.overwrite.tensor.contents"(%50, %11) : (!torch.vtensor, !torch.tensor) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%40 = torch.copy.to_tensor %39 : !torch.tensor
%41 = torch.copy.to_vtensor %40 : !torch.vtensor
torch.overwrite.tensor.contents %41 overwrites %3 : !torch.vtensor, !torch.tensor
%42 = torch.aten.add_.Tensor %3, %33, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%43 = torch.aten.add_.Tensor %1, %36, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %43, %42 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add_.Tensor'(0x6126250) {
%52 = "torch.aten.add_.Tensor"(%9, %45, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.add_.Tensor -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Failure : does not have value semantics
"(anonymous namespace)::ConvertToImmutableTensors" result 0
} -> FAILURE : pattern failed to match
* Pattern : 'torch.aten.add_.Tensor -> ()' {
Trying to match "(anonymous namespace)::ReduceTrailingUnderscoreInplaceVariant"
** Insert : 'torch.aten.add.Tensor'(0x61a96b0)
** Insert : 'torch.copy.to_vtensor'(0x61a9620)
** Insert : 'torch.overwrite.tensor.contents'(0x61a71d0)
** Replace : 'torch.aten.add_.Tensor'(0x6126250)
"(anonymous namespace)::ReduceTrailingUnderscoreInplaceVariant" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add.Tensor'(0x61a96b0) {
%52 = "torch.aten.add.Tensor"(%9, %45, %5) : (!torch.tensor, !torch.tensor, !torch.float) -> !torch.tensor
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.add.Tensor -> ()' {
Trying to match "(anonymous namespace)::ConvertToImmutableTensors"
** Insert : 'torch.copy.to_vtensor'(0x61a7280)
** Insert : 'torch.copy.to_vtensor'(0x61a7310)
** Insert : 'torch.copy.to_tensor'(0x61a73a0)
"(anonymous namespace)::ConvertToImmutableTensors" result 1
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add.Tensor'(0x61a96b0) {
%54 = "torch.aten.add.Tensor"(%52, %53, %5) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a7280) {
%52 = "torch.copy.to_vtensor"(%9) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a7310) {
%53 = "torch.copy.to_vtensor"(%45) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_tensor'(0x61a73a0) {
%55 = "torch.copy.to_tensor"(%54) : (!torch.vtensor) -> !torch.tensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%40 = torch.copy.to_tensor %39 : !torch.tensor
%41 = torch.copy.to_vtensor %40 : !torch.vtensor
torch.overwrite.tensor.contents %41 overwrites %3 : !torch.vtensor, !torch.tensor
%42 = torch.aten.add_.Tensor %3, %33, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%43 = torch.copy.to_vtensor %1 : !torch.vtensor
%44 = torch.copy.to_vtensor %36 : !torch.vtensor
%45 = torch.aten.add.Tensor %43, %44, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%46 = torch.copy.to_tensor %45 : !torch.tensor
%47 = torch.copy.to_vtensor %46 : !torch.vtensor
torch.overwrite.tensor.contents %47 overwrites %1 : !torch.vtensor, !torch.tensor
%48 = torch.aten.add_.Tensor %1, %36, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %48, %42 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.copy.to_vtensor'(0x61a9620) {
%56 = "torch.copy.to_vtensor"(%55) : (!torch.tensor) -> !torch.vtensor
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.overwrite.tensor.contents'(0x61a71d0) {
"torch.overwrite.tensor.contents"(%56, %9) : (!torch.vtensor, !torch.tensor) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%40 = torch.copy.to_tensor %39 : !torch.tensor
%41 = torch.copy.to_vtensor %40 : !torch.vtensor
torch.overwrite.tensor.contents %41 overwrites %3 : !torch.vtensor, !torch.tensor
%42 = torch.aten.add_.Tensor %3, %33, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
%43 = torch.copy.to_vtensor %1 : !torch.vtensor
%44 = torch.copy.to_vtensor %36 : !torch.vtensor
%45 = torch.aten.add.Tensor %43, %44, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%46 = torch.copy.to_tensor %45 : !torch.tensor
%47 = torch.copy.to_vtensor %46 : !torch.vtensor
torch.overwrite.tensor.contents %47 overwrites %1 : !torch.vtensor, !torch.tensor
%48 = torch.aten.add_.Tensor %1, %36, %float-1.000000e-02 : !torch.tensor, !torch.tensor, !torch.float -> !torch.tensor
return %48, %42 : !torch.tensor, !torch.tensor
}
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x60e2ae0) {
"func.return"(%57, %51) : (!torch.tensor, !torch.tensor) -> ()
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
// -----// IR Dump After ReduceOpVariants //----- //
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int3 = torch.constant.int 3
%int6 = torch.constant.int 6
%none = torch.constant.none
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%40 = torch.copy.to_tensor %39 : !torch.tensor
%41 = torch.copy.to_vtensor %40 : !torch.vtensor
torch.overwrite.tensor.contents %41 overwrites %3 : !torch.vtensor, !torch.tensor
%42 = torch.copy.to_vtensor %1 : !torch.vtensor
%43 = torch.copy.to_vtensor %36 : !torch.vtensor
%44 = torch.aten.add.Tensor %42, %43, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%45 = torch.copy.to_tensor %44 : !torch.tensor
%46 = torch.copy.to_vtensor %45 : !torch.vtensor
torch.overwrite.tensor.contents %46 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f0490) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%2 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%0 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125910) {
%3 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%0 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125970) {
%4 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125910) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x61259d0) {
%5 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x6125970) {
%0 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%6 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61259d0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6103840) {
%7 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6134650) {
%8 = "torch.tensor_static_info_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61346e0) {
%9 = "torch.copy.to_tensor"(%8) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x60dac60) {
%10 = "torch.tensor_static_info_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x610f7d0) {
%11 = "torch.copy.to_tensor"(%10) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6103b70) {
%12 = "torch.tensor_static_info_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x6103c60) {
%13 = "torch.copy.to_tensor"(%12) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x6125af0) {
%14 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%15 = "torch.aten.t"(%9) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6126e80) {
%16 = "torch.copy.to_vtensor"(%11) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6126f10) {
%17 = "torch.copy.to_vtensor"(%13) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6103a80) {
%18 = "torch.copy.to_vtensor"(%15) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%19 = "torch.aten.addmm"(%16, %17, %18, %7, %7) : (!torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x6103990) {
%20 = "torch.copy.to_tensor"(%19) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61038a0) {
%21 = "torch.copy.to_vtensor"(%20) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%22 = "torch.aten.sum"(%21, %3) : (!torch.vtensor, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a5eb0) {
%23 = "torch.copy.to_tensor"(%22) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6050) {
%24 = "torch.copy.to_vtensor"(%23) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%25 = "torch.aten.ones_like"(%24, %4, %6, %14, %0, %7) : (!torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a68d0) {
%26 = "torch.copy.to_tensor"(%25) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%27 = "torch.prim.ListConstruct"(%5, %5) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%28 = "torch.aten.expand"(%26, %27, %0) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125ca0) {
%29 = "torch.aten.t"(%28) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6960) {
%30 = "torch.copy.to_vtensor"(%29) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6140) {
%31 = "torch.copy.to_vtensor"(%13) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%32 = "torch.aten.mm"(%30, %31) : (!torch.vtensor, !torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a69f0) {
%33 = "torch.copy.to_tensor"(%32) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125d80) {
%34 = "torch.aten.t"(%33) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%35 = "torch.prim.ListConstruct"(%6) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a9950) {
%36 = "torch.copy.to_vtensor"(%28) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%37 = "torch.aten.sum.dim_IntList"(%36, %35, %1, %3) : (!torch.vtensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a99e0) {
%38 = "torch.copy.to_tensor"(%37) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%39 = "torch.prim.ListConstruct"(%5) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6125f40) {
%40 = "torch.aten.view"(%38, %39) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6125fb0) {
%41 = "torch.aten.detach"(%40) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126020) {
%42 = "torch.aten.detach"(%41) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6126090) {
%43 = "torch.aten.t"(%34) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126100) {
%44 = "torch.aten.detach"(%43) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126170) {
%45 = "torch.aten.detach"(%44) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7030) {
%46 = "torch.copy.to_vtensor"(%11) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a70c0) {
%47 = "torch.copy.to_vtensor"(%42) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a4990) {
%48 = "torch.aten.add.Tensor"(%46, %47, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a7150) {
%49 = "torch.copy.to_tensor"(%48) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a97b0) {
%50 = "torch.copy.to_vtensor"(%49) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.overwrite.tensor.contents'(0x61a6220) {
"torch.overwrite.tensor.contents"(%50, %11) : (!torch.vtensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7280) {
%51 = "torch.copy.to_vtensor"(%9) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7310) {
%52 = "torch.copy.to_vtensor"(%45) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a96b0) {
%53 = "torch.aten.add.Tensor"(%51, %52, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a73a0) {
%54 = "torch.copy.to_tensor"(%53) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a9620) {
%55 = "torch.copy.to_vtensor"(%54) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.overwrite.tensor.contents'(0x61a71d0) {
"torch.overwrite.tensor.contents"(%55, %9) : (!torch.vtensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60e2ae0) {
"func.return"(%9, %11) : (!torch.tensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemoryEffects::Read)
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61259d0) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x6125970) {
%2 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125910) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%4 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%5 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f0490) {
%7 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6134650) {
%8 = "torch.tensor_static_info_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61346e0) {
%9 = "torch.copy.to_tensor"(%8) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x60dac60) {
%10 = "torch.tensor_static_info_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x610f7d0) {
%11 = "torch.copy.to_tensor"(%10) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6103b70) {
%12 = "torch.tensor_static_info_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.tensor_static_info_cast -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x6103c60) {
%13 = "torch.copy.to_tensor"(%12) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x6125af0) {
%14 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%15 = "torch.aten.t"(%9) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6126e80) {
%16 = "torch.copy.to_vtensor"(%11) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6126f10) {
%17 = "torch.copy.to_vtensor"(%13) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6103a80) {
%18 = "torch.copy.to_vtensor"(%15) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%19 = "torch.aten.addmm"(%16, %17, %18, %7, %7) : (!torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x6103990) {
%20 = "torch.copy.to_tensor"(%19) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61038a0) {
%21 = "torch.copy.to_vtensor"(%20) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%22 = "torch.aten.sum"(%21, %3) : (!torch.vtensor, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a5eb0) {
%23 = "torch.copy.to_tensor"(%22) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6050) {
%24 = "torch.copy.to_vtensor"(%23) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%25 = "torch.aten.ones_like"(%24, %4, %6, %14, %0, %7) : (!torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a68d0) {
%26 = "torch.copy.to_tensor"(%25) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%27 = "torch.prim.ListConstruct"(%5, %5) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%28 = "torch.aten.expand"(%26, %27, %0) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125ca0) {
%29 = "torch.aten.t"(%28) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6960) {
%30 = "torch.copy.to_vtensor"(%29) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6140) {
%31 = "torch.copy.to_vtensor"(%13) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%32 = "torch.aten.mm"(%30, %31) : (!torch.vtensor, !torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a69f0) {
%33 = "torch.copy.to_tensor"(%32) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125d80) {
%34 = "torch.aten.t"(%33) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%35 = "torch.prim.ListConstruct"(%6) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a9950) {
%36 = "torch.copy.to_vtensor"(%28) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%37 = "torch.aten.sum.dim_IntList"(%36, %35, %1, %3) : (!torch.vtensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a99e0) {
%38 = "torch.copy.to_tensor"(%37) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%39 = "torch.prim.ListConstruct"(%5) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6125f40) {
%40 = "torch.aten.view"(%38, %39) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6125fb0) {
%41 = "torch.aten.detach"(%40) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126020) {
%42 = "torch.aten.detach"(%41) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6126090) {
%43 = "torch.aten.t"(%34) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126100) {
%44 = "torch.aten.detach"(%43) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126170) {
%45 = "torch.aten.detach"(%44) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7030) {
%46 = "torch.copy.to_vtensor"(%11) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a70c0) {
%47 = "torch.copy.to_vtensor"(%42) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a4990) {
%48 = "torch.aten.add.Tensor"(%46, %47, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a7150) {
%49 = "torch.copy.to_tensor"(%48) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a97b0) {
%50 = "torch.copy.to_vtensor"(%49) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.overwrite.tensor.contents'(0x61a6220) {
"torch.overwrite.tensor.contents"(%50, %11) : (!torch.vtensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7280) {
%51 = "torch.copy.to_vtensor"(%9) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7310) {
%52 = "torch.copy.to_vtensor"(%45) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a96b0) {
%53 = "torch.aten.add.Tensor"(%51, %52, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a73a0) {
%54 = "torch.copy.to_tensor"(%53) : (!torch.vtensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a9620) {
%55 = "torch.copy.to_vtensor"(%54) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.overwrite.tensor.contents'(0x61a71d0) {
"torch.overwrite.tensor.contents"(%55, %9) : (!torch.vtensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60e2ae0) {
"func.return"(%9, %11) : (!torch.tensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%40 = torch.copy.to_tensor %39 : !torch.tensor
%41 = torch.copy.to_vtensor %40 : !torch.vtensor
torch.overwrite.tensor.contents %41 overwrites %3 : !torch.vtensor, !torch.tensor
%42 = torch.copy.to_vtensor %1 : !torch.vtensor
%43 = torch.copy.to_vtensor %36 : !torch.vtensor
%44 = torch.aten.add.Tensor %42, %43, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%45 = torch.copy.to_tensor %44 : !torch.tensor
%46 = torch.copy.to_vtensor %45 : !torch.vtensor
torch.overwrite.tensor.contents %46 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
// -----// IR Dump After SymbolDCE //----- //
module attributes {torch.debug_module_name = "forward"} {
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%40 = torch.copy.to_tensor %39 : !torch.tensor
%41 = torch.copy.to_vtensor %40 : !torch.vtensor
torch.overwrite.tensor.contents %41 overwrites %3 : !torch.vtensor, !torch.tensor
%42 = torch.copy.to_vtensor %1 : !torch.vtensor
%43 = torch.copy.to_vtensor %36 : !torch.vtensor
%44 = torch.aten.add.Tensor %42, %43, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%45 = torch.copy.to_tensor %44 : !torch.tensor
%46 = torch.copy.to_vtensor %45 : !torch.vtensor
torch.overwrite.tensor.contents %46 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
}
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60e2ae0) {
"func.return"(%9, %11) : (!torch.tensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.overwrite.tensor.contents'(0x61a71d0) {
"torch.overwrite.tensor.contents"(%55, %9) : (!torch.vtensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a9620) {
%55 = "torch.copy.to_vtensor"(%54) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a73a0) {
%54 = "torch.copy.to_tensor"(%53) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Replace : 'torch.copy.to_tensor'(0x61a73a0)
** Replace : 'torch.copy.to_vtensor'(0x61a9620)
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%40 = torch.copy.to_tensor %39 : !torch.tensor
%41 = torch.copy.to_vtensor %40 : !torch.vtensor
torch.overwrite.tensor.contents %41 overwrites %3 : !torch.vtensor, !torch.tensor
%42 = torch.copy.to_vtensor %1 : !torch.vtensor
%43 = torch.copy.to_vtensor %36 : !torch.vtensor
%44 = torch.aten.add.Tensor %42, %43, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %44 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.overwrite.tensor.contents'(0x61a71d0) {
"torch.overwrite.tensor.contents"(%53, %9) : (!torch.vtensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a96b0) {
%53 = "torch.aten.add.Tensor"(%51, %52, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7310) {
%52 = "torch.copy.to_vtensor"(%45) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7280) {
%51 = "torch.copy.to_vtensor"(%9) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.overwrite.tensor.contents'(0x61a6220) {
"torch.overwrite.tensor.contents"(%50, %11) : (!torch.vtensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a97b0) {
%50 = "torch.copy.to_vtensor"(%49) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a7150) {
%49 = "torch.copy.to_tensor"(%48) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Replace : 'torch.copy.to_tensor'(0x61a7150)
** Replace : 'torch.copy.to_vtensor'(0x61a97b0)
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%19 = torch.aten.expand %17, %18, %false : !torch.tensor, !torch.list<int>, !torch.bool -> !torch.tensor
%20 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%21 = torch.copy.to_vtensor %20 : !torch.vtensor
%22 = torch.copy.to_vtensor %5 : !torch.vtensor
%23 = torch.aten.mm %21, %22 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.aten.t %24 : !torch.tensor -> !torch.tensor
%26 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%27 = torch.copy.to_vtensor %19 : !torch.vtensor
%28 = torch.aten.sum.dim_IntList %27, %26, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%29 = torch.copy.to_tensor %28 : !torch.tensor
%30 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%31 = torch.aten.view %29, %30 : !torch.tensor, !torch.list<int> -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.aten.t %25 : !torch.tensor -> !torch.tensor
%35 = torch.aten.detach %34 : !torch.tensor -> !torch.tensor
%36 = torch.aten.detach %35 : !torch.tensor -> !torch.tensor
%37 = torch.copy.to_vtensor %3 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %39 overwrites %3 : !torch.vtensor, !torch.tensor
%40 = torch.copy.to_vtensor %1 : !torch.vtensor
%41 = torch.copy.to_vtensor %36 : !torch.vtensor
%42 = torch.aten.add.Tensor %40, %41, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %42 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.overwrite.tensor.contents'(0x61a6220) {
"torch.overwrite.tensor.contents"(%48, %11) : (!torch.vtensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a4990) {
%48 = "torch.aten.add.Tensor"(%46, %47, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a70c0) {
%47 = "torch.copy.to_vtensor"(%42) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7030) {
%46 = "torch.copy.to_vtensor"(%11) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126170) {
%45 = "torch.aten.detach"(%44) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126100) {
%44 = "torch.aten.detach"(%43) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6126090) {
%43 = "torch.aten.t"(%34) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126020) {
%42 = "torch.aten.detach"(%41) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6125fb0) {
%41 = "torch.aten.detach"(%40) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6125f40) {
%40 = "torch.aten.view"(%38, %39) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%39 = "torch.prim.ListConstruct"(%5) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a99e0) {
%38 = "torch.copy.to_tensor"(%37) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Failure : unsupported op encountered during abstract analysis
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : can only handle these transitive user ops
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%37 = "torch.aten.sum.dim_IntList"(%36, %35, %1, %3) : (!torch.vtensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a9950) {
%36 = "torch.copy.to_vtensor"(%28) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%35 = "torch.prim.ListConstruct"(%6) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125d80) {
%34 = "torch.aten.t"(%33) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a69f0) {
%33 = "torch.copy.to_tensor"(%32) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Failure : unsupported op encountered during abstract analysis
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : can only handle these transitive user ops
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%32 = "torch.aten.mm"(%30, %31) : (!torch.vtensor, !torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6140) {
%31 = "torch.copy.to_vtensor"(%13) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6960) {
%30 = "torch.copy.to_vtensor"(%29) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125ca0) {
%29 = "torch.aten.t"(%28) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%28 = "torch.aten.expand"(%26, %27, %0) : (!torch.tensor, !torch.list<int>, !torch.bool) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%27 = "torch.prim.ListConstruct"(%5, %5) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a68d0) {
%26 = "torch.copy.to_tensor"(%25) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Replace : 'torch.copy.to_tensor'(0x61a68d0)
** Replace : 'torch.copy.to_vtensor'(0x61a6960)
** Replace : 'torch.copy.to_vtensor'(0x61a9950)
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.copy.to_tensor %13 : !torch.tensor
%15 = torch.copy.to_vtensor %14 : !torch.vtensor
%16 = torch.aten.ones_like %15, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%17 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%18 = torch.aten.expand %16, %17, %false : !torch.vtensor, !torch.list<int>, !torch.bool -> !torch.vtensor
%19 = torch.aten.t %18 : !torch.vtensor -> !torch.vtensor
%20 = torch.copy.to_vtensor %5 : !torch.vtensor
%21 = torch.aten.mm %19, %20 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%22 = torch.copy.to_tensor %21 : !torch.tensor
%23 = torch.aten.t %22 : !torch.tensor -> !torch.tensor
%24 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%25 = torch.aten.sum.dim_IntList %18, %24, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%26 = torch.copy.to_tensor %25 : !torch.tensor
%27 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%28 = torch.aten.view %26, %27 : !torch.tensor, !torch.list<int> -> !torch.tensor
%29 = torch.aten.detach %28 : !torch.tensor -> !torch.tensor
%30 = torch.aten.detach %29 : !torch.tensor -> !torch.tensor
%31 = torch.aten.t %23 : !torch.tensor -> !torch.tensor
%32 = torch.aten.detach %31 : !torch.tensor -> !torch.tensor
%33 = torch.aten.detach %32 : !torch.tensor -> !torch.tensor
%34 = torch.copy.to_vtensor %3 : !torch.vtensor
%35 = torch.copy.to_vtensor %30 : !torch.vtensor
%36 = torch.aten.add.Tensor %34, %35, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %36 overwrites %3 : !torch.vtensor, !torch.tensor
%37 = torch.copy.to_vtensor %1 : !torch.vtensor
%38 = torch.copy.to_vtensor %33 : !torch.vtensor
%39 = torch.aten.add.Tensor %37, %38, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %39 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%34 = "torch.aten.sum.dim_IntList"(%27, %33, %1, %3) : (!torch.vtensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%30 = "torch.aten.mm"(%28, %29) : (!torch.vtensor, !torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%27 = "torch.aten.expand"(%25, %26, %0) : (!torch.vtensor, !torch.list<int>, !torch.bool) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%25 = "torch.aten.ones_like"(%24, %4, %6, %14, %0, %7) : (!torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a6050) {
%24 = "torch.copy.to_vtensor"(%23) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a5eb0) {
%23 = "torch.copy.to_tensor"(%22) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Replace : 'torch.copy.to_tensor'(0x61a5eb0)
** Replace : 'torch.copy.to_vtensor'(0x61a6050)
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.copy.to_vtensor %11 : !torch.vtensor
%13 = torch.aten.sum %12, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%14 = torch.aten.ones_like %13, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%15 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%16 = torch.aten.expand %14, %15, %false : !torch.vtensor, !torch.list<int>, !torch.bool -> !torch.vtensor
%17 = torch.aten.t %16 : !torch.vtensor -> !torch.vtensor
%18 = torch.copy.to_vtensor %5 : !torch.vtensor
%19 = torch.aten.mm %17, %18 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%20 = torch.copy.to_tensor %19 : !torch.tensor
%21 = torch.aten.t %20 : !torch.tensor -> !torch.tensor
%22 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%23 = torch.aten.sum.dim_IntList %16, %22, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%24 = torch.copy.to_tensor %23 : !torch.tensor
%25 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%26 = torch.aten.view %24, %25 : !torch.tensor, !torch.list<int> -> !torch.tensor
%27 = torch.aten.detach %26 : !torch.tensor -> !torch.tensor
%28 = torch.aten.detach %27 : !torch.tensor -> !torch.tensor
%29 = torch.aten.t %21 : !torch.tensor -> !torch.tensor
%30 = torch.aten.detach %29 : !torch.tensor -> !torch.tensor
%31 = torch.aten.detach %30 : !torch.tensor -> !torch.tensor
%32 = torch.copy.to_vtensor %3 : !torch.vtensor
%33 = torch.copy.to_vtensor %28 : !torch.vtensor
%34 = torch.aten.add.Tensor %32, %33, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %34 overwrites %3 : !torch.vtensor, !torch.tensor
%35 = torch.copy.to_vtensor %1 : !torch.vtensor
%36 = torch.copy.to_vtensor %31 : !torch.vtensor
%37 = torch.aten.add.Tensor %35, %36, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %37 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%23 = "torch.aten.ones_like"(%22, %4, %6, %14, %0, %7) : (!torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%22 = "torch.aten.sum"(%21, %3) : (!torch.vtensor, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61038a0) {
%21 = "torch.copy.to_vtensor"(%20) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x6103990) {
%20 = "torch.copy.to_tensor"(%19) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Replace : 'torch.copy.to_tensor'(0x6103990)
** Replace : 'torch.copy.to_vtensor'(0x61038a0)
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%5 = torch.copy.to_tensor %4 : !torch.tensor
%cpu = torch.constant.device "cpu"
%6 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%7 = torch.copy.to_vtensor %3 : !torch.vtensor
%8 = torch.copy.to_vtensor %5 : !torch.vtensor
%9 = torch.copy.to_vtensor %6 : !torch.vtensor
%10 = torch.aten.addmm %7, %8, %9, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%11 = torch.aten.sum %10, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%12 = torch.aten.ones_like %11, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%13 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%14 = torch.aten.expand %12, %13, %false : !torch.vtensor, !torch.list<int>, !torch.bool -> !torch.vtensor
%15 = torch.aten.t %14 : !torch.vtensor -> !torch.vtensor
%16 = torch.copy.to_vtensor %5 : !torch.vtensor
%17 = torch.aten.mm %15, %16 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%18 = torch.copy.to_tensor %17 : !torch.tensor
%19 = torch.aten.t %18 : !torch.tensor -> !torch.tensor
%20 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%21 = torch.aten.sum.dim_IntList %14, %20, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%22 = torch.copy.to_tensor %21 : !torch.tensor
%23 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%24 = torch.aten.view %22, %23 : !torch.tensor, !torch.list<int> -> !torch.tensor
%25 = torch.aten.detach %24 : !torch.tensor -> !torch.tensor
%26 = torch.aten.detach %25 : !torch.tensor -> !torch.tensor
%27 = torch.aten.t %19 : !torch.tensor -> !torch.tensor
%28 = torch.aten.detach %27 : !torch.tensor -> !torch.tensor
%29 = torch.aten.detach %28 : !torch.tensor -> !torch.tensor
%30 = torch.copy.to_vtensor %3 : !torch.vtensor
%31 = torch.copy.to_vtensor %26 : !torch.vtensor
%32 = torch.aten.add.Tensor %30, %31, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %32 overwrites %3 : !torch.vtensor, !torch.tensor
%33 = torch.copy.to_vtensor %1 : !torch.vtensor
%34 = torch.copy.to_vtensor %29 : !torch.vtensor
%35 = torch.aten.add.Tensor %33, %34, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %35 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%20 = "torch.aten.sum"(%19, %3) : (!torch.vtensor, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%19 = "torch.aten.addmm"(%16, %17, %18, %7, %7) : (!torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6103a80) {
%18 = "torch.copy.to_vtensor"(%15) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6126f10) {
%17 = "torch.copy.to_vtensor"(%13) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x6126e80) {
%16 = "torch.copy.to_vtensor"(%11) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%15 = "torch.aten.t"(%9) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x6125af0) {
%14 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x6103c60) {
%13 = "torch.copy.to_tensor"(%12) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Replace : 'torch.copy.to_tensor'(0x6103c60)
** Replace : 'torch.copy.to_vtensor'(0x6126f10)
** Replace : 'torch.copy.to_vtensor'(0x61a6140)
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.copy.to_tensor %2 : !torch.tensor
%4 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%cpu = torch.constant.device "cpu"
%5 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%6 = torch.copy.to_vtensor %3 : !torch.vtensor
%7 = torch.copy.to_vtensor %5 : !torch.vtensor
%8 = torch.aten.addmm %6, %4, %7, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%9 = torch.aten.sum %8, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%10 = torch.aten.ones_like %9, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%11 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%12 = torch.aten.expand %10, %11, %false : !torch.vtensor, !torch.list<int>, !torch.bool -> !torch.vtensor
%13 = torch.aten.t %12 : !torch.vtensor -> !torch.vtensor
%14 = torch.aten.mm %13, %4 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%15 = torch.copy.to_tensor %14 : !torch.tensor
%16 = torch.aten.t %15 : !torch.tensor -> !torch.tensor
%17 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%18 = torch.aten.sum.dim_IntList %12, %17, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%19 = torch.copy.to_tensor %18 : !torch.tensor
%20 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%21 = torch.aten.view %19, %20 : !torch.tensor, !torch.list<int> -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.aten.detach %22 : !torch.tensor -> !torch.tensor
%24 = torch.aten.t %16 : !torch.tensor -> !torch.tensor
%25 = torch.aten.detach %24 : !torch.tensor -> !torch.tensor
%26 = torch.aten.detach %25 : !torch.tensor -> !torch.tensor
%27 = torch.copy.to_vtensor %3 : !torch.vtensor
%28 = torch.copy.to_vtensor %23 : !torch.vtensor
%29 = torch.aten.add.Tensor %27, %28, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %29 overwrites %3 : !torch.vtensor, !torch.tensor
%30 = torch.copy.to_vtensor %1 : !torch.vtensor
%31 = torch.copy.to_vtensor %26 : !torch.vtensor
%32 = torch.aten.add.Tensor %30, %31, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %32 overwrites %1 : !torch.vtensor, !torch.tensor
return %1, %3 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%23 = "torch.aten.mm"(%22, %12) : (!torch.vtensor, !torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%17 = "torch.aten.addmm"(%15, %12, %16, %7, %7) : (!torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6103b70) {
%12 = "torch.tensor_static_info_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x610f7d0) {
%11 = "torch.copy.to_tensor"(%10) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Erase : 'torch.overwrite.tensor.contents'(0x61a6220)
** Replace : 'torch.copy.to_tensor'(0x610f7d0)
** Replace : 'torch.copy.to_vtensor'(0x6126e80)
** Replace : 'torch.copy.to_vtensor'(0x61a7030)
** Insert : 'torch.copy.to_vtensor'(0x61a97b0)
** Insert : 'torch.copy.to_tensor'(0x61a7150)
** Insert : 'torch.copy.to_tensor'(0x61a9620)
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.copy.to_tensor %0 : !torch.tensor
%2 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%3 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%cpu = torch.constant.device "cpu"
%4 = torch.aten.t %1 : !torch.tensor -> !torch.tensor
%5 = torch.copy.to_vtensor %4 : !torch.vtensor
%6 = torch.aten.addmm %2, %3, %5, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%7 = torch.aten.sum %6, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%8 = torch.aten.ones_like %7, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%9 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%10 = torch.aten.expand %8, %9, %false : !torch.vtensor, !torch.list<int>, !torch.bool -> !torch.vtensor
%11 = torch.aten.t %10 : !torch.vtensor -> !torch.vtensor
%12 = torch.aten.mm %11, %3 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%13 = torch.copy.to_tensor %12 : !torch.tensor
%14 = torch.aten.t %13 : !torch.tensor -> !torch.tensor
%15 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%16 = torch.aten.sum.dim_IntList %10, %15, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%17 = torch.copy.to_tensor %16 : !torch.tensor
%18 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%19 = torch.aten.view %17, %18 : !torch.tensor, !torch.list<int> -> !torch.tensor
%20 = torch.aten.detach %19 : !torch.tensor -> !torch.tensor
%21 = torch.aten.detach %20 : !torch.tensor -> !torch.tensor
%22 = torch.aten.t %14 : !torch.tensor -> !torch.tensor
%23 = torch.aten.detach %22 : !torch.tensor -> !torch.tensor
%24 = torch.aten.detach %23 : !torch.tensor -> !torch.tensor
%25 = torch.copy.to_vtensor %21 : !torch.vtensor
%26 = torch.aten.add.Tensor %2, %25, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%27 = torch.copy.to_vtensor %1 : !torch.vtensor
%28 = torch.copy.to_vtensor %24 : !torch.vtensor
%29 = torch.aten.add.Tensor %27, %28, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.overwrite.tensor.contents %29 overwrites %1 : !torch.vtensor, !torch.tensor
%30 = torch.copy.to_vtensor %1 : !torch.vtensor
%31 = torch.copy.to_tensor %30 : !torch.tensor
%32 = torch.copy.to_tensor %26 : !torch.tensor
return %31, %32 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a9620) {
%41 = "torch.copy.to_tensor"(%35) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : no types to change
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a7150) {
%40 = "torch.copy.to_tensor"(%39) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : no types to change
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a97b0) {
%39 = "torch.copy.to_vtensor"(%9) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a4990) {
%35 = "torch.aten.add.Tensor"(%10, %34, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%15 = "torch.aten.addmm"(%10, %11, %14, %7, %7) : (!torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x60dac60) {
%10 = "torch.tensor_static_info_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61346e0) {
%9 = "torch.copy.to_tensor"(%8) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Erase : 'torch.overwrite.tensor.contents'(0x61a71d0)
** Replace : 'torch.copy.to_tensor'(0x61346e0)
** Replace : 'torch.copy.to_vtensor'(0x6103a80)
** Replace : 'torch.copy.to_vtensor'(0x61a7280)
** Replace : 'torch.copy.to_vtensor'(0x61a97b0)
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%2 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%cpu = torch.constant.device "cpu"
%3 = torch.aten.t %0 : !torch.vtensor -> !torch.vtensor
%4 = torch.aten.addmm %1, %2, %3, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%5 = torch.aten.sum %4, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%6 = torch.aten.ones_like %5, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%7 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%8 = torch.aten.expand %6, %7, %false : !torch.vtensor, !torch.list<int>, !torch.bool -> !torch.vtensor
%9 = torch.aten.t %8 : !torch.vtensor -> !torch.vtensor
%10 = torch.aten.mm %9, %2 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.aten.t %11 : !torch.tensor -> !torch.tensor
%13 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%14 = torch.aten.sum.dim_IntList %8, %13, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%15 = torch.copy.to_tensor %14 : !torch.tensor
%16 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%17 = torch.aten.view %15, %16 : !torch.tensor, !torch.list<int> -> !torch.tensor
%18 = torch.aten.detach %17 : !torch.tensor -> !torch.tensor
%19 = torch.aten.detach %18 : !torch.tensor -> !torch.tensor
%20 = torch.aten.t %12 : !torch.tensor -> !torch.tensor
%21 = torch.aten.detach %20 : !torch.tensor -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.copy.to_vtensor %19 : !torch.vtensor
%24 = torch.aten.add.Tensor %1, %23, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%25 = torch.copy.to_vtensor %22 : !torch.vtensor
%26 = torch.aten.add.Tensor %0, %25, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%27 = torch.copy.to_tensor %26 : !torch.tensor
%28 = torch.copy.to_tensor %24 : !torch.tensor
return %27, %28 : !torch.tensor, !torch.tensor
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a7150) {
%36 = "torch.copy.to_tensor"(%35) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : no types to change
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a96b0) {
%35 = "torch.aten.add.Tensor"(%8, %34, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%13 = "torch.aten.addmm"(%9, %10, %12, %7, %7) : (!torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%12 = "torch.aten.t"(%8) : (!torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6134650) {
%8 = "torch.tensor_static_info_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f0490) {
%7 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%5 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%4 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125910) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x6125970) {
%2 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61259d0) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60e2ae0) {
"func.return"(%36, %37) : (!torch.tensor, !torch.tensor) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a9620) {
%37 = "torch.copy.to_tensor"(%33) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : no types to change
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a7150) {
%36 = "torch.copy.to_tensor"(%35) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : no types to change
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a96b0) {
%35 = "torch.aten.add.Tensor"(%8, %34, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a7310) {
%34 = "torch.copy.to_vtensor"(%31) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x61a4990) {
%33 = "torch.aten.add.Tensor"(%9, %32, %2) : (!torch.vtensor, !torch.vtensor, !torch.float) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_vtensor'(0x61a70c0) {
%32 = "torch.copy.to_vtensor"(%28) : (!torch.tensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126170) {
%31 = "torch.aten.detach"(%30) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126100) {
%30 = "torch.aten.detach"(%29) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6126090) {
%29 = "torch.aten.t"(%21) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6126020) {
%28 = "torch.aten.detach"(%27) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.detach'(0x6125fb0) {
%27 = "torch.aten.detach"(%26) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.view'(0x6125f40) {
%26 = "torch.aten.view"(%24, %25) : (!torch.tensor, !torch.list<int>) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125ed0) {
%25 = "torch.prim.ListConstruct"(%5) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a99e0) {
%24 = "torch.copy.to_tensor"(%23) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Failure : unsupported op encountered during abstract analysis
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : can only handle these transitive user ops
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum.dim_IntList'(0x6125e60) {
%23 = "torch.aten.sum.dim_IntList"(%17, %22, %1, %3) : (!torch.vtensor, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125df0) {
%22 = "torch.prim.ListConstruct"(%6) : (!torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125d80) {
%21 = "torch.aten.t"(%20) : (!torch.tensor) -> !torch.tensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.copy.to_tensor'(0x61a69f0) {
%20 = "torch.copy.to_tensor"(%19) : (!torch.vtensor) -> !torch.tensor
* Pattern (anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock"
** Failure : unsupported op encountered during abstract analysis
"(anonymous namespace)::AbstractlyInterpretCopyToNonValueTensorOpUsersWithinABlock" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::RewriteViewLikeSubgraph : 'torch.copy.to_tensor -> ()' {
Trying to match "(anonymous namespace)::RewriteViewLikeSubgraph"
** Failure : can only handle these transitive user ops
"(anonymous namespace)::RewriteViewLikeSubgraph" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mm'(0x6125d10) {
%19 = "torch.aten.mm"(%18, %10) : (!torch.vtensor, !torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x6125ca0) {
%18 = "torch.aten.t"(%17) : (!torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.expand'(0x6125c30) {
%17 = "torch.aten.expand"(%15, %16, %0) : (!torch.vtensor, !torch.list<int>, !torch.bool) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6125bc0) {
%16 = "torch.prim.ListConstruct"(%5, %5) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ones_like'(0x6125b50) {
%15 = "torch.aten.ones_like"(%14, %4, %6, %11, %0, %7) : (!torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sum'(0x6121990) {
%14 = "torch.aten.sum"(%13, %3) : (!torch.vtensor, !torch.none) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.addmm'(0x6113a00) {
%13 = "torch.aten.addmm"(%9, %10, %12, %7, %7) : (!torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.t'(0x611e9f0) {
%12 = "torch.aten.t"(%8) : (!torch.vtensor) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.device'(0x6125af0) {
%11 = "torch.constant.device"() {value = "cpu"} : () -> !torch.Device
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6103b70) {
%10 = "torch.tensor_static_info_cast"(%arg2) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x60dac60) {
%9 = "torch.tensor_static_info_cast"(%arg1) : (!torch.vtensor<[3],f32>) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.tensor_static_info_cast'(0x6134650) {
%8 = "torch.tensor_static_info_cast"(%arg0) : (!torch.vtensor<[3,3],f32>) -> !torch.vtensor
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x60f0490) {
%7 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6125850) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61258b0) {
%5 = "torch.constant.int"() {value = 3 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61257f0) {
%4 = "torch.constant.int"() {value = 6 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6125910) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.float'(0x6125970) {
%2 = "torch.constant.float"() {value = -1.000000e-02 : f64} : () -> !torch.float
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61259d0) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6125a30) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After MaximizeValueSemantics //----- //
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%2 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%cpu = torch.constant.device "cpu"
%3 = torch.aten.t %0 : !torch.vtensor -> !torch.vtensor
%4 = torch.aten.addmm %1, %2, %3, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
%5 = torch.aten.sum %4, %none : !torch.vtensor, !torch.none -> !torch.vtensor
%6 = torch.aten.ones_like %5, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
%7 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%8 = torch.aten.expand %6, %7, %false : !torch.vtensor, !torch.list<int>, !torch.bool -> !torch.vtensor
%9 = torch.aten.t %8 : !torch.vtensor -> !torch.vtensor
%10 = torch.aten.mm %9, %2 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.aten.t %11 : !torch.tensor -> !torch.tensor
%13 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%14 = torch.aten.sum.dim_IntList %8, %13, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
%15 = torch.copy.to_tensor %14 : !torch.tensor
%16 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%17 = torch.aten.view %15, %16 : !torch.tensor, !torch.list<int> -> !torch.tensor
%18 = torch.aten.detach %17 : !torch.tensor -> !torch.tensor
%19 = torch.aten.detach %18 : !torch.tensor -> !torch.tensor
%20 = torch.aten.t %12 : !torch.tensor -> !torch.tensor
%21 = torch.aten.detach %20 : !torch.tensor -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.copy.to_vtensor %19 : !torch.vtensor
%24 = torch.aten.add.Tensor %1, %23, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%25 = torch.copy.to_vtensor %22 : !torch.vtensor
%26 = torch.aten.add.Tensor %0, %25, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
%27 = torch.copy.to_tensor %26 : !torch.tensor
%28 = torch.copy.to_tensor %24 : !torch.tensor
return %27, %28 : !torch.tensor, !torch.tensor
}
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::VariadicResults<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CallOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::AtLeastNOperands<2>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionBranchOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::AtLeastNOperands<1>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::torch::Torch::PrimLoopOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionBranchTerminatorOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NRegions<2>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::torch::Torch::PrimIfOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::torch::Torch::ShapeCalculateOp>::Impl<Empty>)
// -----// IR Dump After ReifyShapeCalculations //----- //
module attributes {torch.debug_module_name = "forward"} {
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.addmm(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.any, %arg4: !torch.any) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm(%arg1, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
%1 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.broadcast(%arg0, %0) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
return %1 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.addmm(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.float, %arg4: !torch.float) -> !torch.list<int> {
%0 = torch.derefine %arg3 : !torch.float to !torch.any
%1 = torch.derefine %arg4 : !torch.float to !torch.any
%2 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.addmm(%arg0, %arg1, %arg2, %0, %1) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.any, !torch.any) -> !torch.list<int>
return %2 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.sum(%arg0: !torch.list<int>, %arg1: !torch.optional<int>) -> !torch.list<int> {
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
return %0 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.unary(%arg0: !torch.list<int>) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.ones_like(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.expand(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%str = torch.constant.str "AssertionError: "
%none = torch.constant.none
%true = torch.constant.bool true
%int-1 = torch.constant.int -1
%0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%2 = torch.aten.ge.int %0, %1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %2 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%5 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool
%6 = torch.prim.If %5 -> (!torch.list<int>) {
%7 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg1) : (!torch.list<int>) -> !torch.list<int>
torch.prim.If.yield %7 : !torch.list<int>
} else {
%7 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %3, %true, init() {
^bb0(%arg2: !torch.int):
%8 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int
%9 = torch.aten.sub.int %8, %arg2 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.sub.int %4, %int1 : !torch.int, !torch.int -> !torch.int
%11 = torch.aten.sub.int %10, %9 : !torch.int, !torch.int -> !torch.int
%12 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool
%13 = torch.prim.If %12 -> (!torch.int) {
%20 = torch.aten.__getitem__.t %arg0, %11 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %20 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%14 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%15 = torch.aten.eq.int %14, %int-1 : !torch.int, !torch.int -> !torch.bool
%16 = torch.prim.If %15 -> (!torch.int) {
%20 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %20 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %13 : !torch.int
} else {
torch.prim.If.yield %14 : !torch.int
}
%17 = torch.aten.ne.int %13, %16 : !torch.int, !torch.int -> !torch.bool
%18 = torch.prim.If %17 -> (!torch.int) {
%20 = torch.aten.eq.int %13, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %20 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %16 : !torch.int
} else {
torch.prim.If.yield %13 : !torch.int
}
%19 = torch.aten.append.t %7, %18 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
torch.prim.If.yield %7 : !torch.list<int>
}
return %6 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.expand(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.expand(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%int2 = torch.constant.int 2
%str = torch.constant.str "AssertionError: self must be a matrix"
%none = torch.constant.none
%str_0 = torch.constant.str "AssertionError: mat2 must be a matrix"
%str_1 = torch.constant.str "AssertionError: "
%0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %1 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%3 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%4 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int
%6 = torch.aten.eq.int %4, %5 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%7 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int
%8 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int
%9 = torch.prim.ListConstruct %7, %8 : (!torch.int, !torch.int) -> !torch.list<int>
return %9 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.mm(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mean_dim(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.any) -> !torch.list<int> {
%int1 = torch.constant.int 1
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg4: !torch.int):
%2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%3 = torch.prim.Loop %2, %true, init(%false) {
^bb0(%arg5: !torch.int, %arg6: !torch.bool):
%4 = torch.aten.__getitem__.t %arg1, %arg5 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%6 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim(%4, %5, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int
%7 = torch.aten.eq.int %arg4, %6 : !torch.int, !torch.int -> !torch.bool
%8 = torch.prim.If %7 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
torch.prim.If.yield %arg6 : !torch.bool
}
torch.prim.Loop.condition %true, iter(%8 : !torch.bool)
} : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If %arg2 -> () {
%4 = torch.aten.append.t %0, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
torch.prim.If.yield
}
torch.prim.If.yield
} else {
%4 = torch.aten.__getitem__.t %arg0, %arg4 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.append.t %0, %4 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
}
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.sum.dim_IntList(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.list<int> {
%0 = torch.derefine %arg3 : !torch.optional<int> to !torch.any
%1 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mean_dim(%arg0, %arg1, %arg2, %0) : (!torch.list<int>, !torch.list<int>, !torch.bool, !torch.any) -> !torch.list<int>
return %1 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.numel(%arg0: !torch.list<int>) -> !torch.int {
%int1 = torch.constant.int 1
%true = torch.constant.bool true
%0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%1 = torch.prim.Loop %0, %true, init(%int1) {
^bb0(%arg1: !torch.int, %arg2: !torch.int):
%2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int
%3 = torch.aten.mul.int %arg2, %2 : !torch.int, !torch.int -> !torch.int
torch.prim.Loop.condition %true, iter(%3 : !torch.int)
} : (!torch.int, !torch.bool, !torch.int) -> !torch.int
return %1 : !torch.int
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.infer_size_impl(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%none = torch.constant.none
%true = torch.constant.bool true
%int-1 = torch.constant.int -1
%str = torch.constant.str "AssertionError: only one dimension can be inferred"
%str_0 = torch.constant.str "AssertionError: invalid shape dimensions"
%false = torch.constant.bool false
%str_1 = torch.constant.str "AssertionError: invalid shape"
%0 = torch.prim.Uninitialized : !torch.int
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%2 = torch.derefine %none : !torch.none to !torch.optional<int>
%3:2 = torch.prim.Loop %1, %true, init(%int1, %2) {
^bb0(%arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.optional<int>):
%9 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%10 = torch.aten.eq.int %9, %int-1 : !torch.int, !torch.int -> !torch.bool
%11:2 = torch.prim.If %10 -> (!torch.int, !torch.optional<int>) {
%12 = torch.aten.__isnot__ %arg4, %none : !torch.optional<int>, !torch.none -> !torch.bool
torch.prim.If %12 -> () {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
} else {
torch.prim.If.yield
}
%13 = torch.derefine %arg2 : !torch.int to !torch.optional<int>
torch.prim.If.yield %arg3, %13 : !torch.int, !torch.optional<int>
} else {
%12 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%13 = torch.aten.ge.int %12, %int0 : !torch.int, !torch.int -> !torch.bool
%14 = torch.prim.If %13 -> (!torch.int) {
%15 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%16 = torch.aten.mul.int %arg3, %15 : !torch.int, !torch.int -> !torch.int
torch.prim.If.yield %16 : !torch.int
} else {
torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none
torch.prim.If.yield %0 : !torch.int
}
torch.prim.If.yield %14, %arg4 : !torch.int, !torch.optional<int>
}
torch.prim.Loop.condition %true, iter(%11#0, %11#1 : !torch.int, !torch.optional<int>)
} : (!torch.int, !torch.bool, !torch.int, !torch.optional<int>) -> (!torch.int, !torch.optional<int>)
%4 = torch.aten.eq.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.bool
%5 = torch.prim.If %4 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
%9 = torch.aten.__isnot__ %3#1, %none : !torch.optional<int>, !torch.none -> !torch.bool
%10 = torch.prim.If %9 -> (!torch.bool) {
%12 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int
%13 = torch.aten.gt.int %3#0, %int0 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %13 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
%11 = torch.prim.If %10 -> (!torch.bool) {
%12 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int
%13 = torch.aten.remainder.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.int
%14 = torch.aten.eq.int %13, %int0 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %14 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
torch.prim.If.yield %11 : !torch.bool
}
%6 = torch.aten.__not__ %5 : !torch.bool -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none
torch.prim.If.yield
} else {
torch.prim.If.yield
}
%7 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>
%8 = torch.aten.__isnot__ %3#1, %none : !torch.optional<int>, !torch.none -> !torch.bool
torch.prim.If %8 -> () {
%9 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int
%10 = torch.aten.floordiv.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.int
%11 = torch.aten._set_item.t %7, %9, %10 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
torch.prim.If.yield
}
return %7 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.view(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.numel(%arg0) : (!torch.list<int>) -> !torch.int
%1 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.infer_size_impl(%arg1, %0) : (!torch.list<int>, !torch.int) -> !torch.list<int>
return %1 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.view(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.view(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.int {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%str = torch.constant.str "AssertionError: "
%none = torch.constant.none
%true = torch.constant.bool true
%0 = torch.aten.le.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool
%1 = torch.prim.If %0 -> (!torch.int) {
torch.prim.If %arg2 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %int1 : !torch.int
} else {
torch.prim.If.yield %arg1 : !torch.int
}
%2 = torch.aten.neg.int %1 : !torch.int -> !torch.int
%3 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int
%4 = torch.aten.lt.int %arg0, %2 : !torch.int, !torch.int -> !torch.bool
%5 = torch.prim.If %4 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
%9 = torch.aten.gt.int %arg0, %3 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %9 : !torch.bool
}
%6 = torch.aten.__not__ %5 : !torch.bool -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%7 = torch.aten.lt.int %arg0, %int0 : !torch.int, !torch.int -> !torch.bool
%8 = torch.prim.If %7 -> (!torch.int) {
%9 = torch.aten.add.int %arg0, %1 : !torch.int, !torch.int -> !torch.int
torch.prim.If.yield %9 : !torch.int
} else {
torch.prim.If.yield %arg0 : !torch.int
}
return %8 : !torch.int
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0: !torch.list<int>) -> !torch.list<int> {
%true = torch.constant.bool true
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg1: !torch.int):
%2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int
%3 = torch.aten.append.t %0, %2 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.transpose(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {
%true = torch.constant.bool true
%0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%1 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim(%arg1, %0, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int
%2 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim(%arg2, %0, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int
%3 = torch.aten.eq.int %1, %2 : !torch.int, !torch.int -> !torch.bool
%4 = torch.prim.If %3 -> (!torch.list<int>) {
%5 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>
torch.prim.If.yield %5 : !torch.list<int>
} else {
%5 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %0, %true, init() {
^bb0(%arg3: !torch.int):
%6 = torch.aten.eq.int %arg3, %1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %6 -> () {
%7 = torch.aten.__getitem__.t %arg0, %2 : !torch.list<int>, !torch.int -> !torch.int
%8 = torch.aten.append.t %5, %7 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
%7 = torch.aten.eq.int %arg3, %2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %7 -> () {
%8 = torch.aten.__getitem__.t %arg0, %1 : !torch.list<int>, !torch.int -> !torch.int
%9 = torch.aten.append.t %5, %8 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
%8 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int
%9 = torch.aten.append.t %5, %8 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
}
torch.prim.If.yield
}
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
torch.prim.If.yield %5 : !torch.list<int>
}
return %4 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.t(%arg0: !torch.list<int>) -> !torch.list<int> {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.transpose(%arg0, %int0, %int1) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.list<int>
return %0 : !torch.list<int>
}
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.broadcast(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%true = torch.constant.bool true
%false = torch.constant.bool false
%str = torch.constant.str "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"
%str_0 = torch.constant.str "AssertionError: "
%none = torch.constant.none
%0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%2 = torch.prim.max.int %0, %1 : !torch.int, !torch.int -> !torch.int
%3 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %2, %true, init() {
^bb0(%arg2: !torch.int):
%4 = torch.aten.sub.int %2, %int1 : !torch.int, !torch.int -> !torch.int
%5 = torch.aten.sub.int %4, %arg2 : !torch.int, !torch.int -> !torch.int
%6 = torch.aten.sub.int %0, %int1 : !torch.int, !torch.int -> !torch.int
%7 = torch.aten.sub.int %6, %5 : !torch.int, !torch.int -> !torch.int
%8 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int
%9 = torch.aten.sub.int %8, %5 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.ge.int %7, %int0 : !torch.int, !torch.int -> !torch.bool
%11 = torch.prim.If %10 -> (!torch.int) {
%20 = torch.aten.__getitem__.t %arg0, %7 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %20 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%12 = torch.aten.ge.int %9, %int0 : !torch.int, !torch.int -> !torch.bool
%13 = torch.prim.If %12 -> (!torch.int) {
%20 = torch.aten.__getitem__.t %arg1, %9 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %20 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%14 = torch.aten.ne.int %11, %13 : !torch.int, !torch.int -> !torch.bool
%15 = torch.prim.If %14 -> (!torch.bool) {
%20 = torch.aten.ne.int %11, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %20 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
%16 = torch.prim.If %15 -> (!torch.bool) {
%20 = torch.aten.ne.int %13, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %20 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
torch.prim.If %16 -> () {
%20 = torch.aten.format(%str, %11, %13, %arg2) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str
%21 = torch.aten.add.str %str_0, %20 : !torch.str, !torch.str -> !torch.str
torch.prim.RaiseException %21, %none : !torch.str, !torch.none
torch.prim.If.yield
} else {
torch.prim.If.yield
}
%17 = torch.aten.eq.int %11, %int1 : !torch.int, !torch.int -> !torch.bool
%18 = torch.prim.If %17 -> (!torch.int) {
torch.prim.If.yield %13 : !torch.int
} else {
torch.prim.If.yield %11 : !torch.int
}
%19 = torch.aten.append.t %3, %18 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %3 : !torch.list<int>
}
func private @__torch_mlir_shape_fn.aten.add.Tensor(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
func @forward(%arg0: !torch.vtensor<[3,3],f32>, %arg1: !torch.vtensor<[3],f32>, %arg2: !torch.vtensor<[3,3],f32>) -> (!torch.tensor, !torch.tensor) {
%false = torch.constant.bool false
%true = torch.constant.bool true
%float-1.000000e-02 = torch.constant.float -1.000000e-02
%none = torch.constant.none
%int6 = torch.constant.int 6
%int3 = torch.constant.int 3
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.tensor_static_info_cast %arg0 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%1 = torch.tensor_static_info_cast %arg1 : !torch.vtensor<[3],f32> to !torch.vtensor
%2 = torch.tensor_static_info_cast %arg2 : !torch.vtensor<[3,3],f32> to !torch.vtensor
%cpu = torch.constant.device "cpu"
%3 = torch.shape.calculate {
%29 = torch.aten.t %0 : !torch.vtensor -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %0 : !torch.vtensor -> !torch.list<int>
%30 = call @__torch_mlir_shape_fn.aten.t(%29) : (!torch.list<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %30 : !torch.list<int>
} : !torch.vtensor
%4 = torch.shape.calculate {
%29 = torch.aten.addmm %1, %2, %3, %int1, %int1 : !torch.vtensor, !torch.vtensor, !torch.vtensor, !torch.int, !torch.int -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %1 : !torch.vtensor -> !torch.list<int>
%30 = torch.aten.size %2 : !torch.vtensor -> !torch.list<int>
%31 = torch.aten.size %3 : !torch.vtensor -> !torch.list<int>
%32 = torch.aten.Float.Scalar %int1 : !torch.int -> !torch.float
%33 = torch.aten.Float.Scalar %int1 : !torch.int -> !torch.float
%34 = call @__torch_mlir_shape_fn.aten.addmm(%29, %30, %31, %32, %33) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.float, !torch.float) -> !torch.list<int>
torch.shape.calculate.yield.shapes %34 : !torch.list<int>
} : !torch.vtensor
%5 = torch.shape.calculate {
%29 = torch.aten.sum %4, %none : !torch.vtensor, !torch.none -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %4 : !torch.vtensor -> !torch.list<int>
%30 = torch.derefine %none : !torch.none to !torch.optional<int>
%31 = call @__torch_mlir_shape_fn.aten.sum(%29, %30) : (!torch.list<int>, !torch.optional<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %31 : !torch.list<int>
} : !torch.vtensor
%6 = torch.shape.calculate {
%29 = torch.aten.ones_like %5, %int6, %int0, %cpu, %false, %int1 : !torch.vtensor, !torch.int, !torch.int, !torch.Device, !torch.bool, !torch.int -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %5 : !torch.vtensor -> !torch.list<int>
%30 = torch.derefine %int6 : !torch.int to !torch.optional<int>
%31 = torch.derefine %int0 : !torch.int to !torch.optional<int>
%32 = torch.derefine %cpu : !torch.Device to !torch.optional<Device>
%33 = torch.derefine %false : !torch.bool to !torch.optional<bool>
%34 = torch.derefine %int1 : !torch.int to !torch.optional<int>
%35 = call @__torch_mlir_shape_fn.aten.ones_like(%29, %30, %31, %32, %33, %34) : (!torch.list<int>, !torch.optional<int>, !torch.optional<int>, !torch.optional<Device>, !torch.optional<bool>, !torch.optional<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %35 : !torch.list<int>
} : !torch.vtensor
%7 = torch.prim.ListConstruct %int3, %int3 : (!torch.int, !torch.int) -> !torch.list<int>
%8 = torch.shape.calculate {
%29 = torch.aten.expand %6, %7, %false : !torch.vtensor, !torch.list<int>, !torch.bool -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %6 : !torch.vtensor -> !torch.list<int>
%30 = call @__torch_mlir_shape_fn.aten.expand(%29, %7, %false) : (!torch.list<int>, !torch.list<int>, !torch.bool) -> !torch.list<int>
torch.shape.calculate.yield.shapes %30 : !torch.list<int>
} : !torch.vtensor
%9 = torch.shape.calculate {
%29 = torch.aten.t %8 : !torch.vtensor -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %8 : !torch.vtensor -> !torch.list<int>
%30 = call @__torch_mlir_shape_fn.aten.t(%29) : (!torch.list<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %30 : !torch.list<int>
} : !torch.vtensor
%10 = torch.shape.calculate {
%29 = torch.aten.mm %9, %2 : !torch.vtensor, !torch.vtensor -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %9 : !torch.vtensor -> !torch.list<int>
%30 = torch.aten.size %2 : !torch.vtensor -> !torch.list<int>
%31 = call @__torch_mlir_shape_fn.aten.mm(%29, %30) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %31 : !torch.list<int>
} : !torch.vtensor
%11 = torch.copy.to_tensor %10 : !torch.tensor
%12 = torch.shape.calculate {
%29 = torch.aten.t %11 : !torch.tensor -> !torch.tensor
torch.shape.calculate.yield %29 : !torch.tensor
} shapes {
%29 = torch.aten.size %11 : !torch.tensor -> !torch.list<int>
%30 = call @__torch_mlir_shape_fn.aten.t(%29) : (!torch.list<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %30 : !torch.list<int>
} : !torch.tensor
%13 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>
%14 = torch.shape.calculate {
%29 = torch.aten.sum.dim_IntList %8, %13, %true, %none : !torch.vtensor, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %8 : !torch.vtensor -> !torch.list<int>
%30 = torch.derefine %none : !torch.none to !torch.optional<int>
%31 = call @__torch_mlir_shape_fn.aten.sum.dim_IntList(%29, %13, %true, %30) : (!torch.list<int>, !torch.list<int>, !torch.bool, !torch.optional<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %31 : !torch.list<int>
} : !torch.vtensor
%15 = torch.copy.to_tensor %14 : !torch.tensor
%16 = torch.prim.ListConstruct %int3 : (!torch.int) -> !torch.list<int>
%17 = torch.shape.calculate {
%29 = torch.aten.view %15, %16 : !torch.tensor, !torch.list<int> -> !torch.tensor
torch.shape.calculate.yield %29 : !torch.tensor
} shapes {
%29 = torch.aten.size %15 : !torch.tensor -> !torch.list<int>
%30 = call @__torch_mlir_shape_fn.aten.view(%29, %16) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %30 : !torch.list<int>
} : !torch.tensor
%18 = torch.aten.detach %17 : !torch.tensor -> !torch.tensor
%19 = torch.aten.detach %18 : !torch.tensor -> !torch.tensor
%20 = torch.shape.calculate {
%29 = torch.aten.t %12 : !torch.tensor -> !torch.tensor
torch.shape.calculate.yield %29 : !torch.tensor
} shapes {
%29 = torch.aten.size %12 : !torch.tensor -> !torch.list<int>
%30 = call @__torch_mlir_shape_fn.aten.t(%29) : (!torch.list<int>) -> !torch.list<int>
torch.shape.calculate.yield.shapes %30 : !torch.list<int>
} : !torch.tensor
%21 = torch.aten.detach %20 : !torch.tensor -> !torch.tensor
%22 = torch.aten.detach %21 : !torch.tensor -> !torch.tensor
%23 = torch.copy.to_vtensor %19 : !torch.vtensor
%24 = torch.shape.calculate {
%29 = torch.aten.add.Tensor %1, %23, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %1 : !torch.vtensor -> !torch.list<int>
%30 = torch.aten.size %23 : !torch.vtensor -> !torch.list<int>
%31 = call @__torch_mlir_shape_fn.aten.add.Tensor(%29, %30, %float-1.000000e-02) : (!torch.list<int>, !torch.list<int>, !torch.float) -> !torch.list<int>
torch.shape.calculate.yield.shapes %31 : !torch.list<int>
} : !torch.vtensor
%25 = torch.copy.to_vtensor %22 : !torch.vtensor
%26 = torch.shape.calculate {
%29 = torch.aten.add.Tensor %0, %25, %float-1.000000e-02 : !torch.vtensor, !torch.vtensor, !torch.float -> !torch.vtensor
torch.shape.calculate.yield %29 : !torch.vtensor
} shapes {
%29 = torch.aten.size %0 : !torch.vtensor -> !torch.list<int>
%30 = torch.aten.size %25 : !torch.vtensor -> !torch.list<int>
%31 = call @__torch_mlir_shape_fn.aten.add.Tensor(%29, %30, %float-1.000000e-02) : (!torch.list<int>, !torch.list<int>, !torch.float) -> !torch.list<int>
torch.shape.calculate.yield.shapes %31 : !torch.list<int>
} : !torch.vtensor
%27 = torch.copy.to_tensor %26 : !torch.tensor
%28 = torch.copy.to_tensor %24 : !torch.tensor
return %27, %28 : !torch.tensor, !torch.tensor
}
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d60f0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62711a0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d6150) {
%1 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d60f0) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d61b0) {
%2 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d6150) {
%0 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d6210) {
%3 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d61b0) {
%0 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d6270) {
%4 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d6210) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d62d0) {
%5 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d6270) {
%0 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d6330) {
%6 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d62d0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d6390) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61d6420) {
%8 = "torch.aten.eq.int"(%7, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61f0eb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6510) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61d6c80) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6570) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61f0f70) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61f10a0) {
%10 = "torch.aten.eq.int"(%9, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61f1390) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6050) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61f0ff0) {
"torch.prim.RaiseException"(%1, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61f1330) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61f14f0) {
%11 = "torch.aten.__getitem__.t"(%arg0, %5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61f15a0) {
%12 = "torch.aten.__getitem__.t"(%arg1, %6) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61f1650) {
%13 = "torch.aten.eq.int"(%11, %12) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d3f90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d3e90) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61f1440) {
"torch.prim.RaiseException"(%0, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61f16f0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d40f0) {
%14 = "torch.aten.__getitem__.t"(%arg0, %6) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d41a0) {
%15 = "torch.aten.__getitem__.t"(%arg1, %5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61d4250) {
%16 = "torch.prim.ListConstruct"(%14, %15) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61d6a40) {
"func.return"(%16) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d62d0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d6270) {
%1 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d6210) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d61b0) {
%3 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d6150) {
%4 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d60f0) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62711a0) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d6390) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61d6420) {
%8 = "torch.aten.eq.int"(%7, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61f0eb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6510) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61d6c80) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6570) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61f0f70) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61f10a0) {
%10 = "torch.aten.eq.int"(%9, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61f1390) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6050) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61f0ff0) {
"torch.prim.RaiseException"(%1, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61f1330) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61f14f0) {
%11 = "torch.aten.__getitem__.t"(%arg0, %5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61f15a0) {
%12 = "torch.aten.__getitem__.t"(%arg1, %6) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61f1650) {
%13 = "torch.aten.eq.int"(%11, %12) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d3f90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d3e90) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61f1440) {
"torch.prim.RaiseException"(%0, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61f16f0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d40f0) {
%14 = "torch.aten.__getitem__.t"(%arg0, %6) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d41a0) {
%15 = "torch.aten.__getitem__.t"(%arg1, %5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61d4250) {
%16 = "torch.prim.ListConstruct"(%14, %15) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61d6a40) {
"func.return"(%16) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%str = torch.constant.str "AssertionError: "
%str_0 = torch.constant.str "AssertionError: mat2 must be a matrix"
%none = torch.constant.none
%str_1 = torch.constant.str "AssertionError: self must be a matrix"
%int2 = torch.constant.int 2
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %1 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%3 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%4 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int
%6 = torch.aten.eq.int %4, %5 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%7 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int
%8 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int
%9 = torch.prim.ListConstruct %7, %8 : (!torch.int, !torch.int) -> !torch.list<int>
return %9 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d8ef0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d6330) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d8f50) {
%1 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d8ef0) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d8fb0) {
%2 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d8f50) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d9010) {
%3 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d8fb0) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9070) {
%4 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9010) {
%0 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d90d0) {
%5 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9070) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d9130) {
%6 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d90d0) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d8d80) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d91c0) {
%8 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.max.int'(0x61d9250) {
%9 = "torch.prim.max.int"(%7, %8) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61d9300) {
%10 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x61d9990) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db720) {
%11 = "torch.aten.sub.int"(%9, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db7d0) {
%12 = "torch.aten.sub.int"(%11, %arg2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db880) {
%13 = "torch.aten.sub.int"(%7, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db930) {
%14 = "torch.aten.sub.int"(%13, %12) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db9e0) {
%15 = "torch.aten.sub.int"(%8, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61dba90) {
%16 = "torch.aten.sub.int"(%15, %12) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x61dbb40) {
%17 = "torch.aten.ge.int"(%14, %6) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dbdc0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dbc90) {
%27 = "torch.aten.__getitem__.t"(%arg0, %14) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d4350) {
"torch.prim.If.yield"(%27) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dbd30) {
"torch.prim.If.yield"(%5) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x61dbe80) {
%19 = "torch.aten.ge.int"(%16, %6) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d94d0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dbf80) {
%27 = "torch.aten.__getitem__.t"(%arg1, %16) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dc120) {
"torch.prim.If.yield"(%27) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dc070) {
"torch.prim.If.yield"(%5) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61d9590) {
%21 = "torch.aten.ne.int"(%18, %20) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d98e0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61d96b0) {
%27 = "torch.aten.ne.int"(%18, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d9850) {
"torch.prim.If.yield"(%27) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d97a0) {
"torch.prim.If.yield"(%3) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dd290) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61d9b40) {
%27 = "torch.aten.ne.int"(%20, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d93b0) {
"torch.prim.If.yield"(%27) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd200) {
"torch.prim.If.yield"(%3) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dd5a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.format'(0x61d9bf0) {
%27 = "torch.aten.format"(%2, %18, %20, %arg2) : (!torch.str, !torch.int, !torch.int, !torch.int) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.str'(0x61dd480) {
%28 = "torch.aten.add.str"(%1, %27) : (!torch.str, !torch.str) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61d4040) {
"torch.prim.RaiseException"(%28, %0) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd540) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd3e0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61dd700) {
%24 = "torch.aten.eq.int"(%18, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dd950) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd7f0) {
"torch.prim.If.yield"(%20) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd8c0) {
"torch.prim.If.yield"(%18) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61dda10) {
%26 = "torch.aten.append.t"(%10, %25) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61ddab0) {
"torch.prim.Loop.condition"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61d9a40) {
"func.return"(%10) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d90d0) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9070) {
%1 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9010) {
%2 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d8fb0) {
%3 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d8f50) {
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d8ef0) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d6330) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d8d80) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d91c0) {
%8 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.max.int'(0x61d9250) {
%9 = "torch.prim.max.int"(%7, %8) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61d9300) {
%10 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x61d9990) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db720) {
%11 = "torch.aten.sub.int"(%9, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db7d0) {
%12 = "torch.aten.sub.int"(%11, %arg2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db880) {
%13 = "torch.aten.sub.int"(%7, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db930) {
%14 = "torch.aten.sub.int"(%13, %12) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61db9e0) {
%15 = "torch.aten.sub.int"(%8, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61dba90) {
%16 = "torch.aten.sub.int"(%15, %12) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x61dbb40) {
%17 = "torch.aten.ge.int"(%14, %6) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dbdc0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dbc90) {
%27 = "torch.aten.__getitem__.t"(%arg0, %14) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d4350) {
"torch.prim.If.yield"(%27) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dbd30) {
"torch.prim.If.yield"(%5) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x61dbe80) {
%19 = "torch.aten.ge.int"(%16, %6) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d94d0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dbf80) {
%27 = "torch.aten.__getitem__.t"(%arg1, %16) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dc120) {
"torch.prim.If.yield"(%27) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dc070) {
"torch.prim.If.yield"(%5) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61d9590) {
%21 = "torch.aten.ne.int"(%18, %20) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d98e0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61d96b0) {
%27 = "torch.aten.ne.int"(%18, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d9850) {
"torch.prim.If.yield"(%27) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d97a0) {
"torch.prim.If.yield"(%3) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dd290) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61d9b40) {
%27 = "torch.aten.ne.int"(%20, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d93b0) {
"torch.prim.If.yield"(%27) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd200) {
"torch.prim.If.yield"(%3) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dd5a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.format'(0x61d9bf0) {
%27 = "torch.aten.format"(%2, %18, %20, %arg2) : (!torch.str, !torch.int, !torch.int, !torch.int) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.str'(0x61dd480) {
%28 = "torch.aten.add.str"(%1, %27) : (!torch.str, !torch.str) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61d4040) {
"torch.prim.RaiseException"(%28, %0) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd540) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd3e0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61dd700) {
%24 = "torch.aten.eq.int"(%18, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dd950) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd7f0) {
"torch.prim.If.yield"(%20) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dd8c0) {
"torch.prim.If.yield"(%18) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61dda10) {
%26 = "torch.aten.append.t"(%10, %25) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61ddab0) {
"torch.prim.Loop.condition"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61d9a40) {
"func.return"(%10) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.broadcast(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%none = torch.constant.none
%str = torch.constant.str "AssertionError: "
%str_0 = torch.constant.str "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"
%false = torch.constant.bool false
%true = torch.constant.bool true
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%2 = torch.prim.max.int %0, %1 : !torch.int, !torch.int -> !torch.int
%3 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %2, %true, init() {
^bb0(%arg2: !torch.int):
%4 = torch.aten.sub.int %2, %int1 : !torch.int, !torch.int -> !torch.int
%5 = torch.aten.sub.int %4, %arg2 : !torch.int, !torch.int -> !torch.int
%6 = torch.aten.sub.int %0, %int1 : !torch.int, !torch.int -> !torch.int
%7 = torch.aten.sub.int %6, %5 : !torch.int, !torch.int -> !torch.int
%8 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int
%9 = torch.aten.sub.int %8, %5 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.ge.int %7, %int0 : !torch.int, !torch.int -> !torch.bool
%11 = torch.prim.If %10 -> (!torch.int) {
%20 = torch.aten.__getitem__.t %arg0, %7 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %20 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%12 = torch.aten.ge.int %9, %int0 : !torch.int, !torch.int -> !torch.bool
%13 = torch.prim.If %12 -> (!torch.int) {
%20 = torch.aten.__getitem__.t %arg1, %9 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %20 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%14 = torch.aten.ne.int %11, %13 : !torch.int, !torch.int -> !torch.bool
%15 = torch.prim.If %14 -> (!torch.bool) {
%20 = torch.aten.ne.int %11, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %20 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
%16 = torch.prim.If %15 -> (!torch.bool) {
%20 = torch.aten.ne.int %13, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %20 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
torch.prim.If %16 -> () {
%20 = torch.aten.format(%str_0, %11, %13, %arg2) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str
%21 = torch.aten.add.str %str, %20 : !torch.str, !torch.str -> !torch.str
torch.prim.RaiseException %21, %none : !torch.str, !torch.none
torch.prim.If.yield
} else {
torch.prim.If.yield
}
%17 = torch.aten.eq.int %11, %int1 : !torch.int, !torch.int -> !torch.bool
%18 = torch.prim.If %17 -> (!torch.int) {
torch.prim.If.yield %13 : !torch.int
} else {
torch.prim.If.yield %11 : !torch.int
}
%19 = torch.aten.append.t %3, %18 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %3 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'func.call'(0x61db550) {
%0 = "func.call"(%arg1, %arg2) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm} : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x61fe060) {
%1 = "func.call"(%arg0, %0) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.broadcast} : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61ddb90) {
"func.return"(%1) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.addmm(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.any, %arg4: !torch.any) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm(%arg1, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
%1 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.broadcast(%arg0, %0) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
return %1 : !torch.list<int>
}
* Inlining call: %0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm(%arg1, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
* Inlining call: %10 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.broadcast(%arg0, %9) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9130) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61c2ab0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6216f30) {
%1 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9130) {
%0 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x62704a0) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6216f30) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62174b0) {
%3 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62704a0) {
%0 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270720) {
%4 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62174b0) {
%0 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270800) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270720) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6103840) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270800) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6278d40) {
%7 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6257fd0) {
%8 = "torch.aten.eq.int"(%7, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62702b0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62762d0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62761c0) {
"torch.prim.RaiseException"(%3, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275e50) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61b61f0) {
%9 = "torch.aten.len.t"(%arg2) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61d1a50) {
%10 = "torch.aten.eq.int"(%9, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270570) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275d40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6275c30) {
"torch.prim.RaiseException"(%5, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275b20) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d43e0) {
%11 = "torch.aten.__getitem__.t"(%arg1, %1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d6ad0) {
%12 = "torch.aten.__getitem__.t"(%arg2, %0) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x625b810) {
%13 = "torch.aten.eq.int"(%11, %12) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270600) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275a10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62764b0) {
"torch.prim.RaiseException"(%6, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6276ee0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d5c20) {
%14 = "torch.aten.__getitem__.t"(%arg1, %0) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d8090) {
%15 = "torch.aten.__getitem__.t"(%arg2, %1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61db330) {
%16 = "torch.prim.ListConstruct"(%14, %15) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6275910) {
%17 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6216f30) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6276d10) {
%17 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61c2ab0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6276c00) {
%17 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6103840) {
%0 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276a20) {
%18 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276c00) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276910) {
%19 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276a20) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6276730) {
%20 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270720) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62765d0) {
%20 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270800) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61db3a0) {
%20 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d4830) {
%21 = "torch.aten.len.t"(%19) : (!torch.list<int>) -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62174b0) {
%0 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.max.int'(0x61fe520) {
%21 = "torch.prim.max.int"(%20, %0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61fe590) {
%22 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6258730) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61eab50) {
%23 = "torch.aten.sub.int"(%21, %2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x623fcd0) {
%24 = "torch.aten.sub.int"(%23, %arg5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x626bdc0) {
%25 = "torch.aten.sub.int"(%20, %2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x626be30) {
%26 = "torch.aten.sub.int"(%25, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61be060) {
%27 = "torch.aten.sub.int"(%0, %2) : (!torch.int, !torch.int) -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61be0d0) {
%27 = "torch.aten.sub.int"(%2, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x626b8b0) {
%28 = "torch.aten.ge.int"(%26, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6268510) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d4500) {
%38 = "torch.aten.__getitem__.t"(%arg0, %26) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277750) {
"torch.prim.If.yield"(%38) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277640) {
"torch.prim.If.yield"(%2) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x626b920) {
%30 = "torch.aten.ge.int"(%27, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6261f60) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61b6060) {
%38 = "torch.aten.__getitem__.t"(%19, %27) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
** Failure : statically invalid index
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277410) {
"torch.prim.If.yield"(%38) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277340) {
"torch.prim.If.yield"(%2) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61c76f0) {
%32 = "torch.aten.ne.int"(%29, %31) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x626a970) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61be460) {
%38 = "torch.aten.ne.int"(%29, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62772a0) {
"torch.prim.If.yield"(%38) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277190) {
"torch.prim.If.yield"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6269720) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61eac70) {
%38 = "torch.aten.ne.int"(%31, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277db0) {
"torch.prim.If.yield"(%38) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6270770) {
"torch.prim.If.yield"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61c7750) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.format'(0x6248e40) {
%38 = "torch.aten.format"(%5, %29, %31, %arg5) : (!torch.str, !torch.int, !torch.int, !torch.int) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.str'(0x6248eb0) {
%39 = "torch.aten.add.str"(%6, %38) : (!torch.str, !torch.str) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6279010) {
"torch.prim.RaiseException"(%39, %7) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dee30) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6272950) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6240d30) {
%35 = "torch.aten.eq.int"(%29, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x626a810) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6278b10) {
"torch.prim.If.yield"(%31) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6278110) {
"torch.prim.If.yield"(%29) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6240da0) {
%37 = "torch.aten.append.t"(%22, %36) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6277970) {
"torch.prim.Loop.condition"(%3) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61ddb90) {
"func.return"(%22) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62174b0) {
%0 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270800) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270720) {
%2 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276a20) {
%3 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276c00) {
%4 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6103840) {
%5 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61c2ab0) {
%6 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6216f30) {
%7 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62704a0) {
%8 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9130) {
%9 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6278d40) {
%10 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6257fd0) {
%11 = "torch.aten.eq.int"(%10, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62702b0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62762d0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62761c0) {
"torch.prim.RaiseException"(%8, %7) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275e50) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61b61f0) {
%12 = "torch.aten.len.t"(%arg2) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61d1a50) {
%13 = "torch.aten.eq.int"(%12, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270570) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275d40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6275c30) {
"torch.prim.RaiseException"(%9, %7) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275b20) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d43e0) {
%14 = "torch.aten.__getitem__.t"(%arg1, %2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d6ad0) {
%15 = "torch.aten.__getitem__.t"(%arg2, %1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x625b810) {
%16 = "torch.aten.eq.int"(%14, %15) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270600) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275a10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62764b0) {
"torch.prim.RaiseException"(%6, %7) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6276ee0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d5c20) {
%17 = "torch.aten.__getitem__.t"(%arg1, %1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d8090) {
%18 = "torch.aten.__getitem__.t"(%arg2, %2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61db330) {
%19 = "torch.prim.ListConstruct"(%17, %18) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61db3a0) {
%20 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.max.int'(0x61fe520) {
%21 = "torch.prim.max.int"(%20, %0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61fe590) {
%22 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6258730) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61eab50) {
%23 = "torch.aten.sub.int"(%21, %2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x623fcd0) {
%24 = "torch.aten.sub.int"(%23, %arg5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x626bdc0) {
%25 = "torch.aten.sub.int"(%20, %2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x626be30) {
%26 = "torch.aten.sub.int"(%25, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61be0d0) {
%27 = "torch.aten.sub.int"(%2, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x626b8b0) {
%28 = "torch.aten.ge.int"(%26, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6268510) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d4500) {
%38 = "torch.aten.__getitem__.t"(%arg0, %26) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277750) {
"torch.prim.If.yield"(%38) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277640) {
"torch.prim.If.yield"(%2) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x626b920) {
%30 = "torch.aten.ge.int"(%27, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6261f60) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61b6060) {
%38 = "torch.aten.__getitem__.t"(%19, %27) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
** Failure : statically invalid index
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277410) {
"torch.prim.If.yield"(%38) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277340) {
"torch.prim.If.yield"(%2) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61c76f0) {
%32 = "torch.aten.ne.int"(%29, %31) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x626a970) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61be460) {
%38 = "torch.aten.ne.int"(%29, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62772a0) {
"torch.prim.If.yield"(%38) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277190) {
"torch.prim.If.yield"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6269720) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61eac70) {
%38 = "torch.aten.ne.int"(%31, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277db0) {
"torch.prim.If.yield"(%38) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6270770) {
"torch.prim.If.yield"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61c7750) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.format'(0x6248e40) {
%38 = "torch.aten.format"(%5, %29, %31, %arg5) : (!torch.str, !torch.int, !torch.int, !torch.int) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.str'(0x6248eb0) {
%39 = "torch.aten.add.str"(%6, %38) : (!torch.str, !torch.str) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6279010) {
"torch.prim.RaiseException"(%39, %7) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dee30) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6272950) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6240d30) {
%35 = "torch.aten.eq.int"(%29, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x626a810) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6278b10) {
"torch.prim.If.yield"(%31) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6278110) {
"torch.prim.If.yield"(%29) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6240da0) {
%37 = "torch.aten.append.t"(%22, %36) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6277970) {
"torch.prim.Loop.condition"(%3) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61ddb90) {
"func.return"(%22) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.addmm(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.any, %arg4: !torch.any) -> !torch.list<int> {
%int2 = torch.constant.int 2
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%true = torch.constant.bool true
%false = torch.constant.bool false
%str = torch.constant.str "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"
%str_0 = torch.constant.str "AssertionError: "
%none = torch.constant.none
%str_1 = torch.constant.str "AssertionError: self must be a matrix"
%str_2 = torch.constant.str "AssertionError: mat2 must be a matrix"
%0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %1 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%2 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int
%3 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%4 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int
%6 = torch.aten.eq.int %4, %5 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%7 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int
%8 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int
%9 = torch.prim.ListConstruct %7, %8 : (!torch.int, !torch.int) -> !torch.list<int>
%10 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%11 = torch.prim.max.int %10, %int2 : !torch.int, !torch.int -> !torch.int
%12 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %11, %true, init() {
^bb0(%arg5: !torch.int):
%13 = torch.aten.sub.int %11, %int1 : !torch.int, !torch.int -> !torch.int
%14 = torch.aten.sub.int %13, %arg5 : !torch.int, !torch.int -> !torch.int
%15 = torch.aten.sub.int %10, %int1 : !torch.int, !torch.int -> !torch.int
%16 = torch.aten.sub.int %15, %14 : !torch.int, !torch.int -> !torch.int
%17 = torch.aten.sub.int %int1, %14 : !torch.int, !torch.int -> !torch.int
%18 = torch.aten.ge.int %16, %int0 : !torch.int, !torch.int -> !torch.bool
%19 = torch.prim.If %18 -> (!torch.int) {
%28 = torch.aten.__getitem__.t %arg0, %16 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %28 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%20 = torch.aten.ge.int %17, %int0 : !torch.int, !torch.int -> !torch.bool
%21 = torch.prim.If %20 -> (!torch.int) {
%28 = torch.aten.__getitem__.t %9, %17 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %28 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%22 = torch.aten.ne.int %19, %21 : !torch.int, !torch.int -> !torch.bool
%23 = torch.prim.If %22 -> (!torch.bool) {
%28 = torch.aten.ne.int %19, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %28 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
%24 = torch.prim.If %23 -> (!torch.bool) {
%28 = torch.aten.ne.int %21, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %28 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
torch.prim.If %24 -> () {
%28 = torch.aten.format(%str, %19, %21, %arg5) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str
%29 = torch.aten.add.str %str_0, %28 : !torch.str, !torch.str -> !torch.str
torch.prim.RaiseException %29, %none : !torch.str, !torch.none
torch.prim.If.yield
} else {
torch.prim.If.yield
}
%25 = torch.aten.eq.int %19, %int1 : !torch.int, !torch.int -> !torch.bool
%26 = torch.prim.If %25 -> (!torch.int) {
torch.prim.If.yield %21 : !torch.int
} else {
torch.prim.If.yield %19 : !torch.int
}
%27 = torch.aten.append.t %12, %26 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %12 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x61db110) {
%0 = "torch.derefine"(%arg3) : (!torch.float) -> !torch.any
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x61db1a0) {
%1 = "torch.derefine"(%arg4) : (!torch.float) -> !torch.any
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x60436b0) {
%2 = "func.call"(%arg0, %arg1, %arg2, %0, %1) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.addmm} : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.any, !torch.any) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61db250) {
"func.return"(%2) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.addmm(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.float, %arg4: !torch.float) -> !torch.list<int> {
%0 = torch.derefine %arg3 : !torch.float to !torch.any
%1 = torch.derefine %arg4 : !torch.float to !torch.any
%2 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.addmm(%arg0, %arg1, %arg2, %0, %1) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.any, !torch.any) -> !torch.list<int>
return %2 : !torch.list<int>
}
* Inlining call: %2 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.addmm(%arg0, %arg1, %arg2, %0, %1) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.any, !torch.any) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x61db110) {
%0 = "torch.derefine"(%arg3) : (!torch.float) -> !torch.any
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x61db1a0) {
%0 = "torch.derefine"(%arg4) : (!torch.float) -> !torch.any
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62174b0) {
%0 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6276910) {
%0 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270800) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62174b0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270720) {
%2 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270800) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276a20) {
%3 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6270720) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276c00) {
%4 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276a20) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6103840) {
%5 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6276c00) {
%0 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61c2ab0) {
%6 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6103840) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6216f30) {
%7 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61c2ab0) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62704a0) {
%8 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6216f30) {
%0 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d9130) {
%9 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62704a0) {
%0 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6278d40) {
%10 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6257fd0) {
%11 = "torch.aten.eq.int"(%10, %9) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62702b0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62762d0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62761c0) {
"torch.prim.RaiseException"(%1, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275e50) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61b61f0) {
%12 = "torch.aten.len.t"(%arg2) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61d1a50) {
%13 = "torch.aten.eq.int"(%12, %9) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270570) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275d40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6275c30) {
"torch.prim.RaiseException"(%0, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275b20) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d43e0) {
%14 = "torch.aten.__getitem__.t"(%arg1, %7) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d6ad0) {
%15 = "torch.aten.__getitem__.t"(%arg2, %8) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x625b810) {
%16 = "torch.aten.eq.int"(%14, %15) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270600) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275a10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62764b0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6276ee0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d5c20) {
%17 = "torch.aten.__getitem__.t"(%arg1, %8) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d8090) {
%18 = "torch.aten.__getitem__.t"(%arg2, %7) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61db330) {
%19 = "torch.prim.ListConstruct"(%17, %18) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61db3a0) {
%20 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.max.int'(0x61fe520) {
%21 = "torch.prim.max.int"(%20, %9) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61fe590) {
%22 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6258730) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61eab50) {
%23 = "torch.aten.sub.int"(%21, %7) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x623fcd0) {
%24 = "torch.aten.sub.int"(%23, %arg5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x626bdc0) {
%25 = "torch.aten.sub.int"(%20, %7) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x626be30) {
%26 = "torch.aten.sub.int"(%25, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61be0d0) {
%27 = "torch.aten.sub.int"(%7, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x626b8b0) {
%28 = "torch.aten.ge.int"(%26, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6268510) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d4500) {
%38 = "torch.aten.__getitem__.t"(%arg0, %26) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277750) {
"torch.prim.If.yield"(%38) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277640) {
"torch.prim.If.yield"(%7) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x626b920) {
%30 = "torch.aten.ge.int"(%27, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6261f60) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61b6060) {
%38 = "torch.aten.__getitem__.t"(%19, %27) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
** Failure : statically invalid index
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277410) {
"torch.prim.If.yield"(%38) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277340) {
"torch.prim.If.yield"(%7) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61c76f0) {
%32 = "torch.aten.ne.int"(%29, %31) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x626a970) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61be460) {
%38 = "torch.aten.ne.int"(%29, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62772a0) {
"torch.prim.If.yield"(%38) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277190) {
"torch.prim.If.yield"(%5) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6269720) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61eac70) {
%38 = "torch.aten.ne.int"(%31, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277db0) {
"torch.prim.If.yield"(%38) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6270770) {
"torch.prim.If.yield"(%5) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61c7750) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.format'(0x6248e40) {
%38 = "torch.aten.format"(%4, %29, %31, %arg5) : (!torch.str, !torch.int, !torch.int, !torch.int) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.str'(0x6248eb0) {
%39 = "torch.aten.add.str"(%3, %38) : (!torch.str, !torch.str) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6279010) {
"torch.prim.RaiseException"(%39, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dee30) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6272950) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6240d30) {
%35 = "torch.aten.eq.int"(%29, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x626a810) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6278b10) {
"torch.prim.If.yield"(%31) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6278110) {
"torch.prim.If.yield"(%29) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6240da0) {
%37 = "torch.aten.append.t"(%22, %36) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6277970) {
"torch.prim.Loop.condition"(%6) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61db250) {
"func.return"(%22) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62704a0) {
%0 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6216f30) {
%1 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61c2ab0) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6103840) {
%3 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6276c00) {
%4 = "torch.constant.str"() {value = "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6276a20) {
%5 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6270720) {
%6 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6270800) {
%7 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62174b0) {
%8 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6276910) {
%9 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6278d40) {
%10 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6257fd0) {
%11 = "torch.aten.eq.int"(%10, %9) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62702b0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62762d0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62761c0) {
"torch.prim.RaiseException"(%1, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275e50) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61b61f0) {
%12 = "torch.aten.len.t"(%arg2) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61d1a50) {
%13 = "torch.aten.eq.int"(%12, %9) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270570) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275d40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6275c30) {
"torch.prim.RaiseException"(%0, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275b20) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d43e0) {
%14 = "torch.aten.__getitem__.t"(%arg1, %7) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d6ad0) {
%15 = "torch.aten.__getitem__.t"(%arg2, %8) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x625b810) {
%16 = "torch.aten.eq.int"(%14, %15) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270600) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6275a10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62764b0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6276ee0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d5c20) {
%17 = "torch.aten.__getitem__.t"(%arg1, %8) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d8090) {
%18 = "torch.aten.__getitem__.t"(%arg2, %7) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61db330) {
%19 = "torch.prim.ListConstruct"(%17, %18) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61db3a0) {
%20 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.max.int'(0x61fe520) {
%21 = "torch.prim.max.int"(%20, %9) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61fe590) {
%22 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6258730) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61eab50) {
%23 = "torch.aten.sub.int"(%21, %7) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x623fcd0) {
%24 = "torch.aten.sub.int"(%23, %arg5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x626bdc0) {
%25 = "torch.aten.sub.int"(%20, %7) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x626be30) {
%26 = "torch.aten.sub.int"(%25, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61be0d0) {
%27 = "torch.aten.sub.int"(%7, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x626b8b0) {
%28 = "torch.aten.ge.int"(%26, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6268510) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d4500) {
%38 = "torch.aten.__getitem__.t"(%arg0, %26) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277750) {
"torch.prim.If.yield"(%38) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277640) {
"torch.prim.If.yield"(%7) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x626b920) {
%30 = "torch.aten.ge.int"(%27, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6261f60) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61b6060) {
%38 = "torch.aten.__getitem__.t"(%19, %27) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
** Failure : statically invalid index
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277410) {
"torch.prim.If.yield"(%38) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277340) {
"torch.prim.If.yield"(%7) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61c76f0) {
%32 = "torch.aten.ne.int"(%29, %31) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x626a970) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61be460) {
%38 = "torch.aten.ne.int"(%29, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62772a0) {
"torch.prim.If.yield"(%38) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277190) {
"torch.prim.If.yield"(%5) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6269720) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x61eac70) {
%38 = "torch.aten.ne.int"(%31, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277db0) {
"torch.prim.If.yield"(%38) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6270770) {
"torch.prim.If.yield"(%5) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61c7750) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.format'(0x6248e40) {
%38 = "torch.aten.format"(%4, %29, %31, %arg5) : (!torch.str, !torch.int, !torch.int, !torch.int) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.str'(0x6248eb0) {
%39 = "torch.aten.add.str"(%3, %38) : (!torch.str, !torch.str) -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6279010) {
"torch.prim.RaiseException"(%39, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dee30) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6272950) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6240d30) {
%35 = "torch.aten.eq.int"(%29, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x626a810) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6278b10) {
"torch.prim.If.yield"(%31) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6278110) {
"torch.prim.If.yield"(%29) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6240da0) {
%37 = "torch.aten.append.t"(%22, %36) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6277970) {
"torch.prim.Loop.condition"(%6) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61db250) {
"func.return"(%22) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.addmm(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.float, %arg4: !torch.float) -> !torch.list<int> {
%str = torch.constant.str "AssertionError: mat2 must be a matrix"
%str_0 = torch.constant.str "AssertionError: self must be a matrix"
%none = torch.constant.none
%str_1 = torch.constant.str "AssertionError: "
%str_2 = torch.constant.str "The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}"
%false = torch.constant.bool false
%true = torch.constant.bool true
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%int2 = torch.constant.int 2
%0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %1 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%2 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int
%3 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%4 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int
%6 = torch.aten.eq.int %4, %5 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%7 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int
%8 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int
%9 = torch.prim.ListConstruct %7, %8 : (!torch.int, !torch.int) -> !torch.list<int>
%10 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%11 = torch.prim.max.int %10, %int2 : !torch.int, !torch.int -> !torch.int
%12 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %11, %true, init() {
^bb0(%arg5: !torch.int):
%13 = torch.aten.sub.int %11, %int1 : !torch.int, !torch.int -> !torch.int
%14 = torch.aten.sub.int %13, %arg5 : !torch.int, !torch.int -> !torch.int
%15 = torch.aten.sub.int %10, %int1 : !torch.int, !torch.int -> !torch.int
%16 = torch.aten.sub.int %15, %14 : !torch.int, !torch.int -> !torch.int
%17 = torch.aten.sub.int %int1, %14 : !torch.int, !torch.int -> !torch.int
%18 = torch.aten.ge.int %16, %int0 : !torch.int, !torch.int -> !torch.bool
%19 = torch.prim.If %18 -> (!torch.int) {
%28 = torch.aten.__getitem__.t %arg0, %16 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %28 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%20 = torch.aten.ge.int %17, %int0 : !torch.int, !torch.int -> !torch.bool
%21 = torch.prim.If %20 -> (!torch.int) {
%28 = torch.aten.__getitem__.t %9, %17 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %28 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%22 = torch.aten.ne.int %19, %21 : !torch.int, !torch.int -> !torch.bool
%23 = torch.prim.If %22 -> (!torch.bool) {
%28 = torch.aten.ne.int %19, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %28 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
%24 = torch.prim.If %23 -> (!torch.bool) {
%28 = torch.aten.ne.int %21, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %28 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
torch.prim.If %24 -> () {
%28 = torch.aten.format(%str_2, %19, %21, %arg5) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str
%29 = torch.aten.add.str %str_1, %28 : !torch.str, !torch.str -> !torch.str
torch.prim.RaiseException %29, %none : !torch.str, !torch.none
torch.prim.If.yield
} else {
torch.prim.If.yield
}
%25 = torch.aten.eq.int %19, %int1 : !torch.int, !torch.int -> !torch.bool
%26 = torch.prim.If %25 -> (!torch.int) {
torch.prim.If.yield %21 : !torch.int
} else {
torch.prim.If.yield %19 : !torch.int
}
%27 = torch.aten.append.t %12, %26 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %12 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6123a40) {
%0 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61d3000) {
"func.return"(%0) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.sum(%arg0: !torch.list<int>, %arg1: !torch.optional<int>) -> !torch.list<int> {
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
return %0 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x60f1b80) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d9130) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x611ea60) {
%1 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61346e0) {
%2 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x60d7770) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6103480) {
%3 = "torch.aten.__getitem__.t"(%arg0, %arg1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6104010) {
%4 = "torch.aten.append.t"(%1, %3) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x60f19d0) {
"torch.prim.Loop.condition"(%0) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60d78f0) {
"func.return"(%1) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d9130) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x611ea60) {
%1 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61346e0) {
%2 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x60d7770) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6103480) {
%3 = "torch.aten.__getitem__.t"(%arg0, %arg1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6104010) {
%4 = "torch.aten.append.t"(%1, %3) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x60f19d0) {
"torch.prim.Loop.condition"(%0) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x60d78f0) {
"func.return"(%1) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0: !torch.list<int>) -> !torch.list<int> {
%true = torch.constant.bool true
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg1: !torch.int):
%2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int
%3 = torch.aten.append.t %0, %2 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'func.call'(0x6103a80) {
%0 = "func.call"(%arg0) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy} : (!torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6102cc0) {
"func.return"(%0) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.unary(%arg0: !torch.list<int>) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
* Inlining call: %0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x60f1b80) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x62755e0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61002c0) {
%1 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x62535a0) {
%2 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6248f10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61ddba0) {
%3 = "torch.aten.__getitem__.t"(%arg0, %arg1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6268490) {
%4 = "torch.aten.append.t"(%1, %3) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6103ce0) {
"torch.prim.Loop.condition"(%0) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6102cc0) {
"func.return"(%1) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x62755e0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61002c0) {
%1 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x62535a0) {
%2 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6248f10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61ddba0) {
%3 = "torch.aten.__getitem__.t"(%arg0, %arg1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6268490) {
%4 = "torch.aten.append.t"(%1, %3) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6103ce0) {
"torch.prim.Loop.condition"(%0) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6102cc0) {
"func.return"(%1) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.unary(%arg0: !torch.list<int>) -> !torch.list<int> {
%true = torch.constant.bool true
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg1: !torch.int):
%2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int
%3 = torch.aten.append.t %0, %2 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'func.call'(0x61fadf0) {
%0 = "func.call"(%arg0) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.unary} : (!torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61fad60) {
"func.return"(%0) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.ones_like(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
* Inlining call: %0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x62755e0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x60f1b80) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61002c0) {
%1 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x62535a0) {
%2 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6248f10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61ddba0) {
%3 = "torch.aten.__getitem__.t"(%arg0, %arg6) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6268490) {
%4 = "torch.aten.append.t"(%1, %3) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6103ce0) {
"torch.prim.Loop.condition"(%0) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61fad60) {
"func.return"(%1) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x60f1b80) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61002c0) {
%1 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x62535a0) {
%2 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6248f10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61ddba0) {
%3 = "torch.aten.__getitem__.t"(%arg0, %arg6) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6268490) {
%4 = "torch.aten.append.t"(%1, %3) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6103ce0) {
"torch.prim.Loop.condition"(%0) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61fad60) {
"func.return"(%1) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.ones_like(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {
%true = torch.constant.bool true
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg6: !torch.int):
%2 = torch.aten.__getitem__.t %arg0, %arg6 : !torch.list<int>, !torch.int -> !torch.int
%3 = torch.aten.append.t %0, %2 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62755e0) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204cb0) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204d10) {
%2 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204cb0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d70) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d10) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204dd0) {
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204d70) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204e30) {
%5 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204dd0) {
%0 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204e90) {
%6 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204f20) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6205050) {
%8 = "torch.aten.ge.int"(%6, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62052a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205190) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6204fa0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205240) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6205360) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6206420) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6206650) {
%11 = "torch.aten.eq.int"(%9, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62068a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x6206750) {
%13 = "func.call"(%arg1) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy} : (!torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6203140) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6206830) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x62069c0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207310) {
%14 = "torch.aten.sub.int"(%9, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x62073c0) {
%15 = "torch.aten.sub.int"(%14, %arg2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207470) {
%16 = "torch.aten.sub.int"(%10, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207520) {
%17 = "torch.aten.sub.int"(%16, %15) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207600) {
%18 = "torch.aten.ge.int"(%17, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207750) {
%26 = "torch.aten.__getitem__.t"(%arg0, %17) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62078d0) {
"torch.prim.If.yield"(%26) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207840) {
"torch.prim.If.yield"(%5) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207a20) {
%20 = "torch.aten.__getitem__.t"(%arg1, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6207ad0) {
%21 = "torch.aten.eq.int"(%20, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62080e0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207bf0) {
%26 = "torch.aten.ge.int"(%17, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207fa0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207e70) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62033e0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207f40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208050) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207c90) {
"torch.prim.If.yield"(%20) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x6208240) {
%23 = "torch.aten.ne.int"(%19, %22) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209760) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x62082f0) {
%26 = "torch.aten.eq.int"(%19, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209620) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207d10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6208190) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62095c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62096d0) {
"torch.prim.If.yield"(%22) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208390) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x62098c0) {
%25 = "torch.aten.append.t"(%13, %24) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x62071d0) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6206a70) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6206af0) {
"func.return"(%12) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204dd0) {
%0 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204d70) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d10) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204cb0) {
%3 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%4 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62755e0) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204e90) {
%6 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204f20) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6205050) {
%8 = "torch.aten.ge.int"(%6, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62052a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205190) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6204fa0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205240) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6205360) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6206420) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6206650) {
%11 = "torch.aten.eq.int"(%9, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62068a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x6206750) {
%13 = "func.call"(%arg1) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy} : (!torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6203140) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6206830) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x62069c0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207310) {
%14 = "torch.aten.sub.int"(%9, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x62073c0) {
%15 = "torch.aten.sub.int"(%14, %arg2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207470) {
%16 = "torch.aten.sub.int"(%10, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207520) {
%17 = "torch.aten.sub.int"(%16, %15) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207600) {
%18 = "torch.aten.ge.int"(%17, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207750) {
%26 = "torch.aten.__getitem__.t"(%arg0, %17) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62078d0) {
"torch.prim.If.yield"(%26) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207840) {
"torch.prim.If.yield"(%5) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207a20) {
%20 = "torch.aten.__getitem__.t"(%arg1, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6207ad0) {
%21 = "torch.aten.eq.int"(%20, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62080e0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207bf0) {
%26 = "torch.aten.ge.int"(%17, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207fa0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207e70) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62033e0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207f40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208050) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207c90) {
"torch.prim.If.yield"(%20) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x6208240) {
%23 = "torch.aten.ne.int"(%19, %22) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209760) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x62082f0) {
%26 = "torch.aten.eq.int"(%19, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209620) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207d10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6208190) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62095c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62096d0) {
"torch.prim.If.yield"(%22) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208390) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x62098c0) {
%25 = "torch.aten.append.t"(%13, %24) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x62071d0) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6206a70) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6206af0) {
"func.return"(%12) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.expand(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%int-1 = torch.constant.int -1
%true = torch.constant.bool true
%none = torch.constant.none
%str = torch.constant.str "AssertionError: "
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%2 = torch.aten.ge.int %0, %1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %2 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%5 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool
%6 = torch.prim.If %5 -> (!torch.list<int>) {
%7 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg1) : (!torch.list<int>) -> !torch.list<int>
torch.prim.If.yield %7 : !torch.list<int>
} else {
%7 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %3, %true, init() {
^bb0(%arg2: !torch.int):
%8 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int
%9 = torch.aten.sub.int %8, %arg2 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.sub.int %4, %int1 : !torch.int, !torch.int -> !torch.int
%11 = torch.aten.sub.int %10, %9 : !torch.int, !torch.int -> !torch.int
%12 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool
%13 = torch.prim.If %12 -> (!torch.int) {
%20 = torch.aten.__getitem__.t %arg0, %11 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %20 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%14 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%15 = torch.aten.eq.int %14, %int-1 : !torch.int, !torch.int -> !torch.bool
%16 = torch.prim.If %15 -> (!torch.int) {
%20 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %20 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %13 : !torch.int
} else {
torch.prim.If.yield %14 : !torch.int
}
%17 = torch.aten.ne.int %13, %16 : !torch.int, !torch.int -> !torch.bool
%18 = torch.prim.If %17 -> (!torch.int) {
%20 = torch.aten.eq.int %13, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %20 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %16 : !torch.int
} else {
torch.prim.If.yield %13 : !torch.int
}
%19 = torch.aten.append.t %7, %18 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
torch.prim.If.yield %7 : !torch.list<int>
}
return %6 : !torch.list<int>
}
* Inlining call: %7 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg1) : (!torch.list<int>) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204dd0) {
%0 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6240e10) {
%0 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204d70) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204dd0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d10) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d70) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204cb0) {
%3 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204d10) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%4 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204cb0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62755e0) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204e90) {
%6 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204f20) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6205050) {
%8 = "torch.aten.ge.int"(%6, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62052a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205190) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6204fa0) {
"torch.prim.RaiseException"(%2, %3) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205240) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6205360) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6206420) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6206650) {
%11 = "torch.aten.eq.int"(%9, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62068a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204e30) {
%13 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6102cd0) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x625b710) {
%14 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6202e10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6202e90) {
%15 = "torch.aten.__getitem__.t"(%arg1, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6202f00) {
%16 = "torch.aten.append.t"(%13, %15) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61be690) {
"torch.prim.Loop.condition"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6203140) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6206830) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x62069c0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207310) {
%14 = "torch.aten.sub.int"(%9, %0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x62073c0) {
%15 = "torch.aten.sub.int"(%14, %arg2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207470) {
%16 = "torch.aten.sub.int"(%10, %0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207520) {
%17 = "torch.aten.sub.int"(%16, %15) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207600) {
%18 = "torch.aten.ge.int"(%17, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207750) {
%26 = "torch.aten.__getitem__.t"(%arg0, %17) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62078d0) {
"torch.prim.If.yield"(%26) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207840) {
"torch.prim.If.yield"(%0) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207a20) {
%20 = "torch.aten.__getitem__.t"(%arg1, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6207ad0) {
%21 = "torch.aten.eq.int"(%20, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62080e0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207bf0) {
%26 = "torch.aten.ge.int"(%17, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207fa0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207e70) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62033e0) {
"torch.prim.RaiseException"(%2, %3) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207f40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208050) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207c90) {
"torch.prim.If.yield"(%20) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x6208240) {
%23 = "torch.aten.ne.int"(%19, %22) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209760) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x62082f0) {
%26 = "torch.aten.eq.int"(%19, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209620) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207d10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6208190) {
"torch.prim.RaiseException"(%2, %3) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62095c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62096d0) {
"torch.prim.If.yield"(%22) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208390) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x62098c0) {
%25 = "torch.aten.append.t"(%13, %24) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x62071d0) {
"torch.prim.Loop.condition"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6206a70) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6206af0) {
"func.return"(%12) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204cb0) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204d10) {
%2 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d70) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204dd0) {
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6240e10) {
%5 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204e90) {
%6 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204f20) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6205050) {
%8 = "torch.aten.ge.int"(%6, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62052a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205190) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6204fa0) {
"torch.prim.RaiseException"(%2, %3) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205240) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6205360) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6206420) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6206650) {
%11 = "torch.aten.eq.int"(%9, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62068a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6102cd0) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x625b710) {
%14 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6202e10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6202e90) {
%15 = "torch.aten.__getitem__.t"(%arg1, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6202f00) {
%16 = "torch.aten.append.t"(%13, %15) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61be690) {
"torch.prim.Loop.condition"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6203140) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6206830) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x62069c0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207310) {
%14 = "torch.aten.sub.int"(%9, %0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x62073c0) {
%15 = "torch.aten.sub.int"(%14, %arg2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207470) {
%16 = "torch.aten.sub.int"(%10, %0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207520) {
%17 = "torch.aten.sub.int"(%16, %15) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207600) {
%18 = "torch.aten.ge.int"(%17, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207750) {
%26 = "torch.aten.__getitem__.t"(%arg0, %17) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62078d0) {
"torch.prim.If.yield"(%26) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207840) {
"torch.prim.If.yield"(%0) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207a20) {
%20 = "torch.aten.__getitem__.t"(%arg1, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6207ad0) {
%21 = "torch.aten.eq.int"(%20, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62080e0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207bf0) {
%26 = "torch.aten.ge.int"(%17, %1) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207fa0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207e70) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62033e0) {
"torch.prim.RaiseException"(%2, %3) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207f40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208050) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207c90) {
"torch.prim.If.yield"(%20) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x6208240) {
%23 = "torch.aten.ne.int"(%19, %22) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209760) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x62082f0) {
%26 = "torch.aten.eq.int"(%19, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209620) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207d10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6208190) {
"torch.prim.RaiseException"(%2, %3) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62095c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62096d0) {
"torch.prim.If.yield"(%22) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208390) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x62098c0) {
%25 = "torch.aten.append.t"(%13, %24) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x62071d0) {
"torch.prim.Loop.condition"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6206a70) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x6206af0) {
"func.return"(%12) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.expand(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%str = torch.constant.str "AssertionError: "
%none = torch.constant.none
%true = torch.constant.bool true
%int-1 = torch.constant.int -1
%0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%2 = torch.aten.ge.int %0, %1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %2 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%5 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool
%6 = torch.prim.If %5 -> (!torch.list<int>) {
%7 = torch.prim.ListConstruct : () -> !torch.list<int>
%8 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
torch.prim.Loop %8, %true, init() {
^bb0(%arg2: !torch.int):
%9 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%10 = torch.aten.append.t %7, %9 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
torch.prim.If.yield %7 : !torch.list<int>
} else {
%7 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %3, %true, init() {
^bb0(%arg2: !torch.int):
%8 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int
%9 = torch.aten.sub.int %8, %arg2 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.sub.int %4, %int1 : !torch.int, !torch.int -> !torch.int
%11 = torch.aten.sub.int %10, %9 : !torch.int, !torch.int -> !torch.int
%12 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool
%13 = torch.prim.If %12 -> (!torch.int) {
%20 = torch.aten.__getitem__.t %arg0, %11 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %20 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%14 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%15 = torch.aten.eq.int %14, %int-1 : !torch.int, !torch.int -> !torch.bool
%16 = torch.prim.If %15 -> (!torch.int) {
%20 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %20 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %13 : !torch.int
} else {
torch.prim.If.yield %14 : !torch.int
}
%17 = torch.aten.ne.int %13, %16 : !torch.int, !torch.int -> !torch.bool
%18 = torch.prim.If %17 -> (!torch.int) {
%20 = torch.aten.eq.int %13, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %20 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %16 : !torch.int
} else {
torch.prim.If.yield %13 : !torch.int
}
%19 = torch.aten.append.t %7, %18 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
torch.prim.If.yield %7 : !torch.list<int>
}
return %6 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'func.call'(0x6203340) {
%0 = "func.call"(%arg0, %arg1) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.expand} : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x62032b0) {
"func.return"(%0) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.expand(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.expand(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
* Inlining call: %0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.expand(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62755e0) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204cb0) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204d10) {
%2 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204cb0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d70) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d10) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204dd0) {
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204d70) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6240e10) {
%5 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204dd0) {
%0 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204e90) {
%6 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204f20) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6205050) {
%8 = "torch.aten.ge.int"(%6, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62052a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205190) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6204fa0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205240) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6205360) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6206420) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6206650) {
%11 = "torch.aten.eq.int"(%9, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62068a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6102cd0) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x625b710) {
%14 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6202e10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6202e90) {
%15 = "torch.aten.__getitem__.t"(%arg1, %arg3) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6202f00) {
%16 = "torch.aten.append.t"(%13, %15) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61be690) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6203140) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6206830) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x62069c0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207310) {
%14 = "torch.aten.sub.int"(%9, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x62073c0) {
%15 = "torch.aten.sub.int"(%14, %arg3) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207470) {
%16 = "torch.aten.sub.int"(%10, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207520) {
%17 = "torch.aten.sub.int"(%16, %15) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207600) {
%18 = "torch.aten.ge.int"(%17, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207750) {
%26 = "torch.aten.__getitem__.t"(%arg0, %17) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62078d0) {
"torch.prim.If.yield"(%26) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207840) {
"torch.prim.If.yield"(%5) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207a20) {
%20 = "torch.aten.__getitem__.t"(%arg1, %arg3) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6207ad0) {
%21 = "torch.aten.eq.int"(%20, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62080e0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207bf0) {
%26 = "torch.aten.ge.int"(%17, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207fa0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207e70) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62033e0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207f40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208050) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207c90) {
"torch.prim.If.yield"(%20) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x6208240) {
%23 = "torch.aten.ne.int"(%19, %22) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209760) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x62082f0) {
%26 = "torch.aten.eq.int"(%19, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209620) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207d10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6208190) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62095c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62096d0) {
"torch.prim.If.yield"(%22) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208390) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x62098c0) {
%25 = "torch.aten.append.t"(%13, %24) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x62071d0) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6206a70) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x62032b0) {
"func.return"(%12) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204dd0) {
%0 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x6204d70) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6204d10) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6204cb0) {
%3 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6204c50) {
%4 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62755e0) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204e90) {
%6 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6204f20) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6205050) {
%8 = "torch.aten.ge.int"(%6, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62052a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205190) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6204fa0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6205240) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6205360) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x6206420) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6206650) {
%11 = "torch.aten.eq.int"(%9, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62068a0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6102cd0) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x625b710) {
%14 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6202e10) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6202e90) {
%15 = "torch.aten.__getitem__.t"(%arg1, %arg3) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x6202f00) {
%16 = "torch.aten.append.t"(%13, %15) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61be690) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6203140) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x6206830) {
%13 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x62069c0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207310) {
%14 = "torch.aten.sub.int"(%9, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x62073c0) {
%15 = "torch.aten.sub.int"(%14, %arg3) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207470) {
%16 = "torch.aten.sub.int"(%10, %5) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6207520) {
%17 = "torch.aten.sub.int"(%16, %15) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207600) {
%18 = "torch.aten.ge.int"(%17, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207750) {
%26 = "torch.aten.__getitem__.t"(%arg0, %17) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62078d0) {
"torch.prim.If.yield"(%26) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207840) {
"torch.prim.If.yield"(%5) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x6207a20) {
%20 = "torch.aten.__getitem__.t"(%arg1, %arg3) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x6207ad0) {
%21 = "torch.aten.eq.int"(%20, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x62080e0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x6207bf0) {
%26 = "torch.aten.ge.int"(%17, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6207fa0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207e70) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x62033e0) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207f40) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208050) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207c90) {
"torch.prim.If.yield"(%20) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ne.int'(0x6208240) {
%23 = "torch.aten.ne.int"(%19, %22) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209760) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x62082f0) {
%26 = "torch.aten.eq.int"(%19, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6209620) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207d10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6208190) {
"torch.prim.RaiseException"(%3, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62095c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62096d0) {
"torch.prim.If.yield"(%22) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6208390) {
"torch.prim.If.yield"(%19) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x62098c0) {
%25 = "torch.aten.append.t"(%13, %24) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x62071d0) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6206a70) {
"torch.prim.If.yield"(%13) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x62032b0) {
"func.return"(%12) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.expand(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.list<int> {
%int-1 = torch.constant.int -1
%true = torch.constant.bool true
%none = torch.constant.none
%str = torch.constant.str "AssertionError: "
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%2 = torch.aten.ge.int %0, %1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %2 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%5 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool
%6 = torch.prim.If %5 -> (!torch.list<int>) {
%7 = torch.prim.ListConstruct : () -> !torch.list<int>
%8 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
torch.prim.Loop %8, %true, init() {
^bb0(%arg3: !torch.int):
%9 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int
%10 = torch.aten.append.t %7, %9 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
torch.prim.If.yield %7 : !torch.list<int>
} else {
%7 = torch.prim.ListConstruct : () -> !torch.list<int>
torch.prim.Loop %3, %true, init() {
^bb0(%arg3: !torch.int):
%8 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int
%9 = torch.aten.sub.int %8, %arg3 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.sub.int %4, %int1 : !torch.int, !torch.int -> !torch.int
%11 = torch.aten.sub.int %10, %9 : !torch.int, !torch.int -> !torch.int
%12 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool
%13 = torch.prim.If %12 -> (!torch.int) {
%20 = torch.aten.__getitem__.t %arg0, %11 : !torch.list<int>, !torch.int -> !torch.int
torch.prim.If.yield %20 : !torch.int
} else {
torch.prim.If.yield %int1 : !torch.int
}
%14 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int
%15 = torch.aten.eq.int %14, %int-1 : !torch.int, !torch.int -> !torch.bool
%16 = torch.prim.If %15 -> (!torch.int) {
%20 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %20 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %13 : !torch.int
} else {
torch.prim.If.yield %14 : !torch.int
}
%17 = torch.aten.ne.int %13, %16 : !torch.int, !torch.int -> !torch.bool
%18 = torch.prim.If %17 -> (!torch.int) {
%20 = torch.aten.eq.int %13, %int1 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %20 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %16 : !torch.int
} else {
torch.prim.If.yield %13 : !torch.int
}
%19 = torch.aten.append.t %7, %18 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
torch.prim.If.yield %7 : !torch.list<int>
}
return %6 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'func.call'(0x61dadf0) {
%0 = "func.call"(%arg0, %arg1) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm} : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61dad60) {
"func.return"(%0) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.mm(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
return %0 : !torch.list<int>
}
* Inlining call: %0 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mm(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d62d0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6240e10) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d6270) {
%1 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d62d0) {
%0 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d6210) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d6270) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d61b0) {
%3 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d6210) {
%0 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d6150) {
%4 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d61b0) {
%0 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d60f0) {
%5 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d6150) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62711a0) {
%6 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d60f0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d6390) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61d6420) {
%8 = "torch.aten.eq.int"(%7, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61f0eb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6510) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61d6c80) {
"torch.prim.RaiseException"(%3, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6570) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61f0f70) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61f10a0) {
%10 = "torch.aten.eq.int"(%9, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61f1390) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6050) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61f0ff0) {
"torch.prim.RaiseException"(%5, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61f1330) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61f14f0) {
%11 = "torch.aten.__getitem__.t"(%arg0, %1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61f15a0) {
%12 = "torch.aten.__getitem__.t"(%arg1, %0) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61f1650) {
%13 = "torch.aten.eq.int"(%11, %12) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d3f90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d3e90) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61f1440) {
"torch.prim.RaiseException"(%6, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61f16f0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d40f0) {
%14 = "torch.aten.__getitem__.t"(%arg0, %0) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d41a0) {
%15 = "torch.aten.__getitem__.t"(%arg1, %1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61d4250) {
%16 = "torch.prim.ListConstruct"(%14, %15) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61dad60) {
"func.return"(%16) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d60f0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d6150) {
%1 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d61b0) {
%2 = "torch.constant.int"() {value = 2 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d6210) {
%3 = "torch.constant.str"() {value = "AssertionError: self must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d6270) {
%4 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d62d0) {
%5 = "torch.constant.str"() {value = "AssertionError: mat2 must be a matrix"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6240e10) {
%6 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61d6390) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61d6420) {
%8 = "torch.aten.eq.int"(%7, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61f0eb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6510) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61d6c80) {
"torch.prim.RaiseException"(%3, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6570) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61f0f70) {
%9 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61f10a0) {
%10 = "torch.aten.eq.int"(%9, %2) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61f1390) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d6050) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61f0ff0) {
"torch.prim.RaiseException"(%5, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61f1330) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61f14f0) {
%11 = "torch.aten.__getitem__.t"(%arg0, %1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61f15a0) {
%12 = "torch.aten.__getitem__.t"(%arg1, %0) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61f1650) {
%13 = "torch.aten.eq.int"(%11, %12) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d3f90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d3e90) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61f1440) {
"torch.prim.RaiseException"(%6, %4) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61f16f0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d40f0) {
%14 = "torch.aten.__getitem__.t"(%arg0, %0) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61d41a0) {
%15 = "torch.aten.__getitem__.t"(%arg1, %1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61d4250) {
%16 = "torch.prim.ListConstruct"(%14, %15) : (!torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61dad60) {
"func.return"(%16) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.mm(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%int2 = torch.constant.int 2
%str = torch.constant.str "AssertionError: self must be a matrix"
%none = torch.constant.none
%str_0 = torch.constant.str "AssertionError: mat2 must be a matrix"
%str_1 = torch.constant.str "AssertionError: "
%0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %1 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%3 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%4 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int
%6 = torch.aten.eq.int %4, %5 : !torch.int, !torch.int -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%7 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int
%8 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int
%9 = torch.prim.ListConstruct %7, %8 : (!torch.int, !torch.int) -> !torch.list<int>
return %9 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d4740) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62711a0) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d5cf0) {
%1 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d4740) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d77d0) {
%2 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d5cf0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d7830) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d77d0) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d7890) {
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d7830) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.le.int'(0x61d78f0) {
%5 = "torch.aten.le.int"(%arg1, %3) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d7c50) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d7a90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d3e10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61a6220) {
"torch.prim.RaiseException"(%2, %1) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d7a30) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d7b40) {
"torch.prim.If.yield"(%4) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d7bc0) {
"torch.prim.If.yield"(%arg1) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.neg.int'(0x61d7660) {
%7 = "torch.aten.neg.int"(%6) : (!torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6100040) {
%8 = "torch.aten.sub.int"(%6, %4) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61000f0) {
%9 = "torch.aten.lt.int"(%arg0, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61cb200) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d7730) {
"torch.prim.If.yield"(%0) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.gt.int'(0x6100390) {
%14 = "torch.aten.gt.int"(%arg0, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb310) {
"torch.prim.If.yield"(%14) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__not__'(0x61cb3a0) {
%11 = "torch.aten.__not__"(%10) : (!torch.bool) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61cb5c0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb4b0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61d7d00) {
"torch.prim.RaiseException"(%2, %1) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb560) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61cb720) {
%12 = "torch.aten.lt.int"(%arg0, %3) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61cbad0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.int'(0x61cb860) {
%14 = "torch.aten.add.int"(%arg0, %6) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cba40) {
"torch.prim.If.yield"(%14) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb950) {
"torch.prim.If.yield"(%arg0) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61cbb80) {
"func.return"(%13) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d7830) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d77d0) {
%1 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x61d5cf0) {
%2 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d4740) {
%3 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62711a0) {
%4 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.le.int'(0x61d78f0) {
%5 = "torch.aten.le.int"(%arg1, %3) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d7c50) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61d7a90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d3e10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61a6220) {
"torch.prim.RaiseException"(%2, %1) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d7a30) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d7b40) {
"torch.prim.If.yield"(%4) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d7bc0) {
"torch.prim.If.yield"(%arg1) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.neg.int'(0x61d7660) {
%7 = "torch.aten.neg.int"(%6) : (!torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x6100040) {
%8 = "torch.aten.sub.int"(%6, %4) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61000f0) {
%9 = "torch.aten.lt.int"(%arg0, %7) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61cb200) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d7730) {
"torch.prim.If.yield"(%0) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.gt.int'(0x6100390) {
%14 = "torch.aten.gt.int"(%arg0, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb310) {
"torch.prim.If.yield"(%14) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__not__'(0x61cb3a0) {
%11 = "torch.aten.__not__"(%10) : (!torch.bool) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61cb5c0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb4b0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61d7d00) {
"torch.prim.RaiseException"(%2, %1) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb560) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61cb720) {
%12 = "torch.aten.lt.int"(%arg0, %3) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61cbad0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.int'(0x61cb860) {
%14 = "torch.aten.add.int"(%arg0, %6) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cba40) {
"torch.prim.If.yield"(%14) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb950) {
"torch.prim.If.yield"(%arg0) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61cbb80) {
"func.return"(%13) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.int {
%true = torch.constant.bool true
%none = torch.constant.none
%str = torch.constant.str "AssertionError: "
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%0 = torch.aten.le.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool
%1 = torch.prim.If %0 -> (!torch.int) {
torch.prim.If %arg2 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
torch.prim.If.yield %int1 : !torch.int
} else {
torch.prim.If.yield %arg1 : !torch.int
}
%2 = torch.aten.neg.int %1 : !torch.int -> !torch.int
%3 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int
%4 = torch.aten.lt.int %arg0, %2 : !torch.int, !torch.int -> !torch.bool
%5 = torch.prim.If %4 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
%9 = torch.aten.gt.int %arg0, %3 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %9 : !torch.bool
}
%6 = torch.aten.__not__ %5 : !torch.bool -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%7 = torch.aten.lt.int %arg0, %int0 : !torch.int, !torch.int -> !torch.bool
%8 = torch.prim.If %7 -> (!torch.int) {
%9 = torch.aten.add.int %arg0, %1 : !torch.int, !torch.int -> !torch.int
torch.prim.If.yield %9 : !torch.int
} else {
torch.prim.If.yield %arg0 : !torch.int
}
return %8 : !torch.int
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61bdd30) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d7890) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd30) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bddf0) {
%2 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61bde80) {
%3 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61bdef0) {
%4 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x61dfd90) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61df5f0) {
%5 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x60caa50) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61e00c0) {
%7 = "torch.aten.__getitem__.t"(%arg1, %arg5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61e0190) {
%8 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x61e0300) {
%9 = "func.call"(%7, %8, %1) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim} : (!torch.int, !torch.int, !torch.bool) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61e03f0) {
%10 = "torch.aten.eq.int"(%arg4, %9) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61e0690) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cce90) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e0600) {
"torch.prim.If.yield"(%arg6) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61a71d0) {
"torch.prim.Loop.condition"(%1, %11) : (!torch.bool, !torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dfb20) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61df960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61df6d0) {
%7 = "torch.aten.append.t"(%3, %2) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df850) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df900) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfa10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dfa80) {
%7 = "torch.aten.__getitem__.t"(%arg0, %arg4) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61dfc10) {
%8 = "torch.aten.append.t"(%3, %7) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfcb0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61dfd10) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61dfe40) {
"func.return"(%3) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd30) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d7890) {
%2 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61bde80) {
%3 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61bdef0) {
%4 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x61dfd90) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61df5f0) {
%5 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x60caa50) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61e00c0) {
%7 = "torch.aten.__getitem__.t"(%arg1, %arg5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61e0190) {
%8 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x61e0300) {
%9 = "func.call"(%7, %8, %1) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim} : (!torch.int, !torch.int, !torch.bool) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61e03f0) {
%10 = "torch.aten.eq.int"(%arg4, %9) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61e0690) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cce90) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e0600) {
"torch.prim.If.yield"(%arg6) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61a71d0) {
"torch.prim.Loop.condition"(%1, %11) : (!torch.bool, !torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dfb20) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61df960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61df6d0) {
%7 = "torch.aten.append.t"(%3, %2) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df850) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df900) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfa10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dfa80) {
%7 = "torch.aten.__getitem__.t"(%arg0, %arg4) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61dfc10) {
%8 = "torch.aten.append.t"(%3, %7) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfcb0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61dfd10) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61dfe40) {
"func.return"(%3) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mean_dim(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.any) -> !torch.list<int> {
%false = torch.constant.bool false
%true = torch.constant.bool true
%int1 = torch.constant.int 1
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg4: !torch.int):
%2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%3 = torch.prim.Loop %2, %true, init(%false) {
^bb0(%arg5: !torch.int, %arg6: !torch.bool):
%4 = torch.aten.__getitem__.t %arg1, %arg5 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%6 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim(%4, %5, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int
%7 = torch.aten.eq.int %arg4, %6 : !torch.int, !torch.int -> !torch.bool
%8 = torch.prim.If %7 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
torch.prim.If.yield %arg6 : !torch.bool
}
torch.prim.Loop.condition %true, iter(%8 : !torch.bool)
} : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If %arg2 -> () {
%4 = torch.aten.append.t %0, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
torch.prim.If.yield
}
torch.prim.If.yield
} else {
%4 = torch.aten.__getitem__.t %arg0, %arg4 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.append.t %0, %4 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
}
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
* Inlining call: %6 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.maybe_wrap_dim(%4, %5, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d4600) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd30) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d7890) {
%2 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61bdd30) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61bde80) {
%3 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61bdef0) {
%4 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x61dfd90) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61df5f0) {
%5 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x60caa50) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61e00c0) {
%7 = "torch.aten.__getitem__.t"(%arg1, %arg5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61e0190) {
%8 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bddf0) {
%9 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6253e10) {
%9 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d7890) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62752b0) {
%10 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6253e10) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6103c00) {
%11 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62752b0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6103b10) {
%12 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.le.int'(0x61dadf0) {
%12 = "torch.aten.le.int"(%11, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270940) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61e3a80) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Replace : 'torch.prim.If'(0x61e3a80)
** Erase : 'torch.prim.If.yield'(0x61cce30)
"" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mean_dim(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.any) -> !torch.list<int> {
%int0 = torch.constant.int 0
%str = torch.constant.str "AssertionError: "
%none = torch.constant.none
%int1 = torch.constant.int 1
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg4: !torch.int):
%2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%3 = torch.prim.Loop %2, %true, init(%false) {
^bb0(%arg5: !torch.int, %arg6: !torch.bool):
%4 = torch.aten.__getitem__.t %arg1, %arg5 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%6 = torch.aten.le.int %5, %int0 : !torch.int, !torch.int -> !torch.bool
%7 = torch.prim.If %6 -> (!torch.int) {
torch.prim.If.yield %int1 : !torch.int
} else {
torch.prim.If.yield %5 : !torch.int
}
%8 = torch.aten.neg.int %7 : !torch.int -> !torch.int
%9 = torch.aten.sub.int %7, %int1 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.lt.int %4, %8 : !torch.int, !torch.int -> !torch.bool
%11 = torch.prim.If %10 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
%17 = torch.aten.gt.int %4, %9 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %17 : !torch.bool
}
%12 = torch.aten.__not__ %11 : !torch.bool -> !torch.bool
torch.prim.If %12 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%13 = torch.aten.lt.int %4, %int0 : !torch.int, !torch.int -> !torch.bool
%14 = torch.prim.If %13 -> (!torch.int) {
%17 = torch.aten.add.int %4, %7 : !torch.int, !torch.int -> !torch.int
torch.prim.If.yield %17 : !torch.int
} else {
torch.prim.If.yield %4 : !torch.int
}
%15 = torch.aten.eq.int %arg4, %14 : !torch.int, !torch.int -> !torch.bool
%16 = torch.prim.If %15 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
torch.prim.If.yield %arg6 : !torch.bool
}
torch.prim.Loop.condition %true, iter(%16 : !torch.bool)
} : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If %arg2 -> () {
%4 = torch.aten.append.t %0, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
torch.prim.If.yield
}
torch.prim.If.yield
} else {
%4 = torch.aten.__getitem__.t %arg0, %arg4 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.append.t %0, %4 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
}
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277f60) {
"torch.prim.If.yield"(%3) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62103a0) {
"torch.prim.If.yield"(%11) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.neg.int'(0x61d8230) {
%14 = "torch.aten.neg.int"(%13) : (!torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61d69f0) {
%15 = "torch.aten.sub.int"(%13, %3) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61d6a60) {
%16 = "torch.aten.lt.int"(%10, %14) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6216e90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d42f0) {
"torch.prim.If.yield"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.gt.int'(0x61be300) {
%23 = "torch.aten.gt.int"(%10, %15) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207250) {
"torch.prim.If.yield"(%23) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__not__'(0x61ef960) {
%18 = "torch.aten.__not__"(%17) : (!torch.bool) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6206740) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb2b0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61db460) {
"torch.prim.RaiseException"(%1, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62754c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61ef9d0) {
%19 = "torch.aten.lt.int"(%10, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270f40) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.int'(0x6271070) {
%23 = "torch.aten.add.int"(%10, %13) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d80f0) {
"torch.prim.If.yield"(%23) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e25c0) {
"torch.prim.If.yield"(%10) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61e03f0) {
%21 = "torch.aten.eq.int"(%arg4, %20) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61e0690) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cce90) {
"torch.prim.If.yield"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e0600) {
"torch.prim.If.yield"(%arg6) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61a71d0) {
"torch.prim.Loop.condition"(%4, %22) : (!torch.bool, !torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dfb20) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61df960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61df6d0) {
%10 = "torch.aten.append.t"(%6, %3) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df850) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df900) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfa10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dfa80) {
%10 = "torch.aten.__getitem__.t"(%arg0, %arg4) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61dfc10) {
%11 = "torch.aten.append.t"(%6, %10) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfcb0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61dfd10) {
"torch.prim.Loop.condition"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61dfe40) {
"func.return"(%6) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62752b0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6253e10) {
%1 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d7890) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61bdd30) {
%3 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d4600) {
%5 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61bde80) {
%6 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61bdef0) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x61dfd90) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61df5f0) {
%8 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x60caa50) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61e00c0) {
%10 = "torch.aten.__getitem__.t"(%arg1, %arg5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61e0190) {
%11 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.le.int'(0x61dadf0) {
%12 = "torch.aten.le.int"(%11, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270940) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277f60) {
"torch.prim.If.yield"(%3) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62103a0) {
"torch.prim.If.yield"(%11) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.neg.int'(0x61d8230) {
%14 = "torch.aten.neg.int"(%13) : (!torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61d69f0) {
%15 = "torch.aten.sub.int"(%13, %3) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61d6a60) {
%16 = "torch.aten.lt.int"(%10, %14) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6216e90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d42f0) {
"torch.prim.If.yield"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.gt.int'(0x61be300) {
%23 = "torch.aten.gt.int"(%10, %15) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207250) {
"torch.prim.If.yield"(%23) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__not__'(0x61ef960) {
%18 = "torch.aten.__not__"(%17) : (!torch.bool) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6206740) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb2b0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61db460) {
"torch.prim.RaiseException"(%1, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62754c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61ef9d0) {
%19 = "torch.aten.lt.int"(%10, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270f40) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.int'(0x6271070) {
%23 = "torch.aten.add.int"(%10, %13) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d80f0) {
"torch.prim.If.yield"(%23) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e25c0) {
"torch.prim.If.yield"(%10) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61e03f0) {
%21 = "torch.aten.eq.int"(%arg4, %20) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61e0690) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cce90) {
"torch.prim.If.yield"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e0600) {
"torch.prim.If.yield"(%arg6) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61a71d0) {
"torch.prim.Loop.condition"(%4, %22) : (!torch.bool, !torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dfb20) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61df960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61df6d0) {
%10 = "torch.aten.append.t"(%6, %3) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df850) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df900) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfa10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dfa80) {
%10 = "torch.aten.__getitem__.t"(%arg0, %arg4) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61dfc10) {
%11 = "torch.aten.append.t"(%6, %10) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfcb0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61dfd10) {
"torch.prim.Loop.condition"(%4) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61dfe40) {
"func.return"(%6) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mean_dim(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.any) -> !torch.list<int> {
%int0 = torch.constant.int 0
%str = torch.constant.str "AssertionError: "
%none = torch.constant.none
%int1 = torch.constant.int 1
%true = torch.constant.bool true
%false = torch.constant.bool false
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg4: !torch.int):
%2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%3 = torch.prim.Loop %2, %true, init(%false) {
^bb0(%arg5: !torch.int, %arg6: !torch.bool):
%4 = torch.aten.__getitem__.t %arg1, %arg5 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%6 = torch.aten.le.int %5, %int0 : !torch.int, !torch.int -> !torch.bool
%7 = torch.prim.If %6 -> (!torch.int) {
torch.prim.If.yield %int1 : !torch.int
} else {
torch.prim.If.yield %5 : !torch.int
}
%8 = torch.aten.neg.int %7 : !torch.int -> !torch.int
%9 = torch.aten.sub.int %7, %int1 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.lt.int %4, %8 : !torch.int, !torch.int -> !torch.bool
%11 = torch.prim.If %10 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
%17 = torch.aten.gt.int %4, %9 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %17 : !torch.bool
}
%12 = torch.aten.__not__ %11 : !torch.bool -> !torch.bool
torch.prim.If %12 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%13 = torch.aten.lt.int %4, %int0 : !torch.int, !torch.int -> !torch.bool
%14 = torch.prim.If %13 -> (!torch.int) {
%17 = torch.aten.add.int %4, %7 : !torch.int, !torch.int -> !torch.int
torch.prim.If.yield %17 : !torch.int
} else {
torch.prim.If.yield %4 : !torch.int
}
%15 = torch.aten.eq.int %arg4, %14 : !torch.int, !torch.int -> !torch.bool
%16 = torch.prim.If %15 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
torch.prim.If.yield %arg6 : !torch.bool
}
torch.prim.Loop.condition %true, iter(%16 : !torch.bool)
} : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If %arg2 -> () {
%4 = torch.aten.append.t %0, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
torch.prim.If.yield
}
torch.prim.If.yield
} else {
%4 = torch.aten.__getitem__.t %arg0, %arg4 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.append.t %0, %4 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
}
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x61e0250) {
%0 = "torch.derefine"(%arg3) : (!torch.optional<int>) -> !torch.any
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x60b74e0) {
%1 = "func.call"(%arg0, %arg1, %arg2, %0) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mean_dim} : (!torch.list<int>, !torch.list<int>, !torch.bool, !torch.any) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61bdbc0) {
"func.return"(%1) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.sum.dim_IntList(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.list<int> {
%0 = torch.derefine %arg3 : !torch.optional<int> to !torch.any
%1 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mean_dim(%arg0, %arg1, %arg2, %0) : (!torch.list<int>, !torch.list<int>, !torch.bool, !torch.any) -> !torch.list<int>
return %1 : !torch.list<int>
}
* Inlining call: %1 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.mean_dim(%arg0, %arg1, %arg2, %0) : (!torch.list<int>, !torch.list<int>, !torch.bool, !torch.any) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x61e0250) {
%0 = "torch.derefine"(%arg3) : (!torch.optional<int>) -> !torch.any
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x62752b0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6103c00) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x6253e10) {
%1 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62752b0) {
%0 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x61d7890) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6253e10) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61bdd30) {
%3 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d7890) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%4 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd30) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61d4600) {
%5 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61bde80) {
%6 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61bdef0) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x61dfd90) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61df5f0) {
%8 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x60caa50) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61e00c0) {
%10 = "torch.aten.__getitem__.t"(%arg1, %arg5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61e0190) {
%11 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.le.int'(0x61dadf0) {
%12 = "torch.aten.le.int"(%11, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270940) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277f60) {
"torch.prim.If.yield"(%2) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62103a0) {
"torch.prim.If.yield"(%11) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.neg.int'(0x61d8230) {
%14 = "torch.aten.neg.int"(%13) : (!torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61d69f0) {
%15 = "torch.aten.sub.int"(%13, %2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61d6a60) {
%16 = "torch.aten.lt.int"(%10, %14) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6216e90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d42f0) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.gt.int'(0x61be300) {
%23 = "torch.aten.gt.int"(%10, %15) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207250) {
"torch.prim.If.yield"(%23) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__not__'(0x61ef960) {
%18 = "torch.aten.__not__"(%17) : (!torch.bool) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6206740) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb2b0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61db460) {
"torch.prim.RaiseException"(%4, %3) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62754c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61ef9d0) {
%19 = "torch.aten.lt.int"(%10, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270f40) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.int'(0x6271070) {
%23 = "torch.aten.add.int"(%10, %13) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d80f0) {
"torch.prim.If.yield"(%23) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e25c0) {
"torch.prim.If.yield"(%10) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61e03f0) {
%21 = "torch.aten.eq.int"(%arg4, %20) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61e0690) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cce90) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e0600) {
"torch.prim.If.yield"(%arg6) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61a71d0) {
"torch.prim.Loop.condition"(%1, %22) : (!torch.bool, !torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dfb20) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61df960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61df6d0) {
%10 = "torch.aten.append.t"(%6, %2) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df850) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df900) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfa10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dfa80) {
%10 = "torch.aten.__getitem__.t"(%arg0, %arg4) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61dfc10) {
%11 = "torch.aten.append.t"(%6, %10) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfcb0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61dfd10) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61bdbc0) {
"func.return"(%6) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd90) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x61bdd30) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d7890) {
%2 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x6253e10) {
%3 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62752b0) {
%4 = "torch.constant.str"() {value = "AssertionError: "} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x6103c00) {
%5 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.ListConstruct'(0x61bde80) {
%6 = "torch.prim.ListConstruct"() : () -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61bdef0) {
%7 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x61dfd90) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61df5f0) {
%8 = "torch.aten.len.t"(%arg1) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x60caa50) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61e00c0) {
%10 = "torch.aten.__getitem__.t"(%arg1, %arg5) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x61e0190) {
%11 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.le.int'(0x61dadf0) {
%12 = "torch.aten.le.int"(%11, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270940) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6277f60) {
"torch.prim.If.yield"(%2) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62103a0) {
"torch.prim.If.yield"(%11) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.neg.int'(0x61d8230) {
%14 = "torch.aten.neg.int"(%13) : (!torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.sub.int'(0x61d69f0) {
%15 = "torch.aten.sub.int"(%13, %2) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61d6a60) {
%16 = "torch.aten.lt.int"(%10, %14) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6216e90) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d42f0) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.gt.int'(0x61be300) {
%23 = "torch.aten.gt.int"(%10, %15) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x6207250) {
"torch.prim.If.yield"(%23) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__not__'(0x61ef960) {
%18 = "torch.aten.__not__"(%17) : (!torch.bool) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6206740) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cb2b0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x61db460) {
"torch.prim.RaiseException"(%4, %3) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x62754c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.lt.int'(0x61ef9d0) {
%19 = "torch.aten.lt.int"(%10, %5) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x6270f40) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.int'(0x6271070) {
%23 = "torch.aten.add.int"(%10, %13) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61d80f0) {
"torch.prim.If.yield"(%23) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e25c0) {
"torch.prim.If.yield"(%10) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x61e03f0) {
%21 = "torch.aten.eq.int"(%arg4, %20) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61e0690) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61cce90) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61e0600) {
"torch.prim.If.yield"(%arg6) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61a71d0) {
"torch.prim.Loop.condition"(%1, %22) : (!torch.bool, !torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61dfb20) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x61df960) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61df6d0) {
%10 = "torch.aten.append.t"(%6, %2) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df850) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61df900) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfa10) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x61dfa80) {
%10 = "torch.aten.__getitem__.t"(%arg0, %arg4) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.append.t'(0x61dfc10) {
%11 = "torch.aten.append.t"(%6, %10) : (!torch.list<int>, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x61dfcb0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x61dfd10) {
"torch.prim.Loop.condition"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x61bdbc0) {
"func.return"(%6) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch_mlir_shape_fn.aten.sum.dim_IntList(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.list<int> {
%false = torch.constant.bool false
%true = torch.constant.bool true
%int1 = torch.constant.int 1
%none = torch.constant.none
%str = torch.constant.str "AssertionError: "
%int0 = torch.constant.int 0
%0 = torch.prim.ListConstruct : () -> !torch.list<int>
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
torch.prim.Loop %1, %true, init() {
^bb0(%arg4: !torch.int):
%2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int
%3 = torch.prim.Loop %2, %true, init(%false) {
^bb0(%arg5: !torch.int, %arg6: !torch.bool):
%4 = torch.aten.__getitem__.t %arg1, %arg5 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%6 = torch.aten.le.int %5, %int0 : !torch.int, !torch.int -> !torch.bool
%7 = torch.prim.If %6 -> (!torch.int) {
torch.prim.If.yield %int1 : !torch.int
} else {
torch.prim.If.yield %5 : !torch.int
}
%8 = torch.aten.neg.int %7 : !torch.int -> !torch.int
%9 = torch.aten.sub.int %7, %int1 : !torch.int, !torch.int -> !torch.int
%10 = torch.aten.lt.int %4, %8 : !torch.int, !torch.int -> !torch.bool
%11 = torch.prim.If %10 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
%17 = torch.aten.gt.int %4, %9 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %17 : !torch.bool
}
%12 = torch.aten.__not__ %11 : !torch.bool -> !torch.bool
torch.prim.If %12 -> () {
torch.prim.If.yield
} else {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
}
%13 = torch.aten.lt.int %4, %int0 : !torch.int, !torch.int -> !torch.bool
%14 = torch.prim.If %13 -> (!torch.int) {
%17 = torch.aten.add.int %4, %7 : !torch.int, !torch.int -> !torch.int
torch.prim.If.yield %17 : !torch.int
} else {
torch.prim.If.yield %4 : !torch.int
}
%15 = torch.aten.eq.int %arg4, %14 : !torch.int, !torch.int -> !torch.bool
%16 = torch.prim.If %15 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
torch.prim.If.yield %arg6 : !torch.bool
}
torch.prim.Loop.condition %true, iter(%16 : !torch.bool)
} : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool
torch.prim.If %3 -> () {
torch.prim.If %arg2 -> () {
%4 = torch.aten.append.t %0, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
torch.prim.If.yield
}
torch.prim.If.yield
} else {
%4 = torch.aten.__getitem__.t %arg0, %arg4 : !torch.list<int>, !torch.int -> !torch.int
%5 = torch.aten.append.t %0, %4 : !torch.list<int>, !torch.int -> !torch.list<int>
torch.prim.If.yield
}
torch.prim.Loop.condition %true, iter()
} : (!torch.int, !torch.bool) -> ()
return %0 : !torch.list<int>
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620c0a0) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d4600) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620c100) {
%1 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620c0a0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x620e7d0) {
%2 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6202d40) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620f1f0) {
%4 = "torch.aten.__getitem__.t"(%arg0, %arg1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mul.int'(0x620f2a0) {
%5 = "torch.aten.mul.int"(%arg2, %4) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6203540) {
"torch.prim.Loop.condition"(%0, %5) : (!torch.bool, !torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x620c010) {
"func.return"(%3) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620c0a0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x61d4600) {
%1 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x620e7d0) {
%2 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x6202d40) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620f1f0) {
%4 = "torch.aten.__getitem__.t"(%arg0, %arg1) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mul.int'(0x620f2a0) {
%5 = "torch.aten.mul.int"(%arg2, %4) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x6203540) {
"torch.prim.Loop.condition"(%0, %5) : (!torch.bool, !torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x620c010) {
"func.return"(%3) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.numel(%arg0: !torch.list<int>) -> !torch.int {
%true = torch.constant.bool true
%int1 = torch.constant.int 1
%0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%1 = torch.prim.Loop %0, %true, init(%int1) {
^bb0(%arg1: !torch.int, %arg2: !torch.int):
%2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int
%3 = torch.aten.mul.int %arg2, %2 : !torch.int, !torch.int -> !torch.int
torch.prim.Loop.condition %true, iter(%3 : !torch.int)
} : (!torch.int, !torch.bool, !torch.int) -> !torch.int
return %1 : !torch.int
}
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bbb0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620c100) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bc10) {
%1 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bbb0) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x620bc70) {
%2 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x620bc10) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620bcd0) {
%3 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620bc70) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bd30) {
%4 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bcd0) {
%0 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bd90) {
%5 = "torch.constant.str"() {value = "AssertionError: only one dimension can be inferred"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bd30) {
%0 = "torch.constant.str"() {value = "AssertionError: only one dimension can be inferred"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620be40) {
%6 = "torch.constant.str"() {value = "AssertionError: invalid shape dimensions"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bd90) {
%0 = "torch.constant.str"() {value = "AssertionError: invalid shape dimensions"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620bea0) {
%7 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620be40) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bf00) {
%8 = "torch.constant.str"() {value = "AssertionError: invalid shape"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bea0) {
%0 = "torch.constant.str"() {value = "AssertionError: invalid shape"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Uninitialized'(0x620bf60) {
%9 = "torch.prim.Uninitialized"() : () -> !torch.int
* Pattern : 'torch.prim.Uninitialized -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x620aa10) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x6206fe0) {
%11 = "torch.derefine"(%6) : (!torch.none) -> !torch.optional<int>
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x620c170) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620ca50) {
%18 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x620cb00) {
%19 = "torch.aten.eq.int"(%18, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620d260) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__isnot__'(0x620cc80) {
%21 = "torch.aten.__isnot__"(%arg4, %6) : (!torch.optional<int>, !torch.none) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620cfb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6209810) {
"torch.prim.RaiseException"(%3, %6) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620cea0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620cf50) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x620d070) {
%22 = "torch.derefine"(%arg2) : (!torch.int) -> !torch.optional<int>
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d0f0) {
"torch.prim.If.yield"(%arg3, %22) : (!torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620d1a0) {
%21 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x620d330) {
%22 = "torch.aten.ge.int"(%21, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620d740) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620d480) {
%24 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mul.int'(0x620d610) {
%25 = "torch.aten.mul.int"(%arg3, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d6b0) {
"torch.prim.If.yield"(%25) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x620cd20) {
"torch.prim.RaiseException"(%2, %6) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d570) {
"torch.prim.If.yield"(%9) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d7f0) {
"torch.prim.If.yield"(%23, %arg4) : (!torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x620d890) {
"torch.prim.Loop.condition"(%5, %20#0, %20#1) : (!torch.bool, !torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x620c310) {
%13 = "torch.aten.eq.int"(%arg1, %12#0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620c4f0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620c3b0) {
"torch.prim.If.yield"(%5) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__isnot__'(0x620c440) {
%18 = "torch.aten.__isnot__"(%12#1, %6) : (!torch.optional<int>, !torch.none) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620c910) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.unchecked_cast'(0x620c670) {
%21 = "torch.prim.unchecked_cast"(%12#1) : (!torch.optional<int>) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.gt.int'(0x620c7e0) {
%22 = "torch.aten.gt.int"(%12#0, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620c880) {
"torch.prim.If.yield"(%22) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620c740) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620dcb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.unchecked_cast'(0x620d960) {
%21 = "torch.prim.unchecked_cast"(%12#1) : (!torch.optional<int>) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.remainder.int'(0x620dad0) {
%22 = "torch.aten.remainder.int"(%arg1, %12#0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x620db80) {
%23 = "torch.aten.eq.int"(%22, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620dc20) {
"torch.prim.If.yield"(%23) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620da30) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620dd60) {
"torch.prim.If.yield"(%20) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__not__'(0x620ddf0) {
%15 = "torch.aten.__not__"(%14) : (!torch.bool) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620df80) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x620c260) {
"torch.prim.RaiseException"(%0, %6) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620de70) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620df20) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x620e0c0) {
%16 = "func.call"(%arg0) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy} : (!torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__isnot__'(0x620e1f0) {
%17 = "torch.aten.__isnot__"(%12#1, %6) : (!torch.optional<int>, !torch.none) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620e630) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.unchecked_cast'(0x620e2f0) {
%18 = "torch.prim.unchecked_cast"(%12#1) : (!torch.optional<int>) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.floordiv.int'(0x620e460) {
%19 = "torch.aten.floordiv.int"(%arg1, %12#0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten._set_item.t'(0x620e510) {
%20 = "torch.aten._set_item.t"(%16, %18, %19) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620e5d0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620e3c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x620e030) {
"func.return"(%16) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bea0) {
%0 = "torch.constant.str"() {value = "AssertionError: invalid shape"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620be40) {
%1 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bd90) {
%2 = "torch.constant.str"() {value = "AssertionError: invalid shape dimensions"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bd30) {
%3 = "torch.constant.str"() {value = "AssertionError: only one dimension can be inferred"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bcd0) {
%4 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620bc70) {
%5 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x620bc10) {
%6 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bbb0) {
%7 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620c100) {
%8 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Uninitialized'(0x620bf60) {
%9 = "torch.prim.Uninitialized"() : () -> !torch.int
* Pattern : 'torch.prim.Uninitialized -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x620aa10) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x6206fe0) {
%11 = "torch.derefine"(%6) : (!torch.none) -> !torch.optional<int>
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x620c170) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620ca50) {
%18 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x620cb00) {
%19 = "torch.aten.eq.int"(%18, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620d260) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__isnot__'(0x620cc80) {
%21 = "torch.aten.__isnot__"(%arg4, %6) : (!torch.optional<int>, !torch.none) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620cfb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6209810) {
"torch.prim.RaiseException"(%3, %6) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620cea0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620cf50) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x620d070) {
%22 = "torch.derefine"(%arg2) : (!torch.int) -> !torch.optional<int>
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d0f0) {
"torch.prim.If.yield"(%arg3, %22) : (!torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620d1a0) {
%21 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x620d330) {
%22 = "torch.aten.ge.int"(%21, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620d740) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620d480) {
%24 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mul.int'(0x620d610) {
%25 = "torch.aten.mul.int"(%arg3, %24) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d6b0) {
"torch.prim.If.yield"(%25) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x620cd20) {
"torch.prim.RaiseException"(%2, %6) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d570) {
"torch.prim.If.yield"(%9) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d7f0) {
"torch.prim.If.yield"(%23, %arg4) : (!torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x620d890) {
"torch.prim.Loop.condition"(%5, %20#0, %20#1) : (!torch.bool, !torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x620c310) {
%13 = "torch.aten.eq.int"(%arg1, %12#0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620c4f0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620c3b0) {
"torch.prim.If.yield"(%5) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__isnot__'(0x620c440) {
%18 = "torch.aten.__isnot__"(%12#1, %6) : (!torch.optional<int>, !torch.none) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620c910) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.unchecked_cast'(0x620c670) {
%21 = "torch.prim.unchecked_cast"(%12#1) : (!torch.optional<int>) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.gt.int'(0x620c7e0) {
%22 = "torch.aten.gt.int"(%12#0, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620c880) {
"torch.prim.If.yield"(%22) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620c740) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620dcb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.unchecked_cast'(0x620d960) {
%21 = "torch.prim.unchecked_cast"(%12#1) : (!torch.optional<int>) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.remainder.int'(0x620dad0) {
%22 = "torch.aten.remainder.int"(%arg1, %12#0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x620db80) {
%23 = "torch.aten.eq.int"(%22, %8) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620dc20) {
"torch.prim.If.yield"(%23) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620da30) {
"torch.prim.If.yield"(%1) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620dd60) {
"torch.prim.If.yield"(%20) : (!torch.bool) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__not__'(0x620ddf0) {
%15 = "torch.aten.__not__"(%14) : (!torch.bool) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620df80) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x620c260) {
"torch.prim.RaiseException"(%0, %6) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620de70) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620df20) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.call'(0x620e0c0) {
%16 = "func.call"(%arg0) {callee = @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy} : (!torch.list<int>) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__isnot__'(0x620e1f0) {
%17 = "torch.aten.__isnot__"(%12#1, %6) : (!torch.optional<int>, !torch.none) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620e630) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.unchecked_cast'(0x620e2f0) {
%18 = "torch.prim.unchecked_cast"(%12#1) : (!torch.optional<int>) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.floordiv.int'(0x620e460) {
%19 = "torch.aten.floordiv.int"(%arg1, %12#0) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten._set_item.t'(0x620e510) {
%20 = "torch.aten._set_item.t"(%16, %18, %19) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.list<int>
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620e5d0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620e3c0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x620e030) {
"func.return"(%16) : (!torch.list<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
// -----// IR Dump After Canonicalizer //----- //
func private @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers.infer_size_impl(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {
%str = torch.constant.str "AssertionError: invalid shape"
%false = torch.constant.bool false
%str_0 = torch.constant.str "AssertionError: invalid shape dimensions"
%str_1 = torch.constant.str "AssertionError: only one dimension can be inferred"
%int-1 = torch.constant.int -1
%true = torch.constant.bool true
%none = torch.constant.none
%int1 = torch.constant.int 1
%int0 = torch.constant.int 0
%0 = torch.prim.Uninitialized : !torch.int
%1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int
%2 = torch.derefine %none : !torch.none to !torch.optional<int>
%3:2 = torch.prim.Loop %1, %true, init(%int1, %2) {
^bb0(%arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.optional<int>):
%9 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%10 = torch.aten.eq.int %9, %int-1 : !torch.int, !torch.int -> !torch.bool
%11:2 = torch.prim.If %10 -> (!torch.int, !torch.optional<int>) {
%12 = torch.aten.__isnot__ %arg4, %none : !torch.optional<int>, !torch.none -> !torch.bool
torch.prim.If %12 -> () {
torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none
torch.prim.If.yield
} else {
torch.prim.If.yield
}
%13 = torch.derefine %arg2 : !torch.int to !torch.optional<int>
torch.prim.If.yield %arg3, %13 : !torch.int, !torch.optional<int>
} else {
%12 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%13 = torch.aten.ge.int %12, %int0 : !torch.int, !torch.int -> !torch.bool
%14 = torch.prim.If %13 -> (!torch.int) {
%15 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int
%16 = torch.aten.mul.int %arg3, %15 : !torch.int, !torch.int -> !torch.int
torch.prim.If.yield %16 : !torch.int
} else {
torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none
torch.prim.If.yield %0 : !torch.int
}
torch.prim.If.yield %14, %arg4 : !torch.int, !torch.optional<int>
}
torch.prim.Loop.condition %true, iter(%11#0, %11#1 : !torch.int, !torch.optional<int>)
} : (!torch.int, !torch.bool, !torch.int, !torch.optional<int>) -> (!torch.int, !torch.optional<int>)
%4 = torch.aten.eq.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.bool
%5 = torch.prim.If %4 -> (!torch.bool) {
torch.prim.If.yield %true : !torch.bool
} else {
%9 = torch.aten.__isnot__ %3#1, %none : !torch.optional<int>, !torch.none -> !torch.bool
%10 = torch.prim.If %9 -> (!torch.bool) {
%12 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int
%13 = torch.aten.gt.int %3#0, %int0 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %13 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
%11 = torch.prim.If %10 -> (!torch.bool) {
%12 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int
%13 = torch.aten.remainder.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.int
%14 = torch.aten.eq.int %13, %int0 : !torch.int, !torch.int -> !torch.bool
torch.prim.If.yield %14 : !torch.bool
} else {
torch.prim.If.yield %false : !torch.bool
}
torch.prim.If.yield %11 : !torch.bool
}
%6 = torch.aten.__not__ %5 : !torch.bool -> !torch.bool
torch.prim.If %6 -> () {
torch.prim.RaiseException %str, %none : !torch.str, !torch.none
torch.prim.If.yield
} else {
torch.prim.If.yield
}
%7 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>
%8 = torch.aten.__isnot__ %3#1, %none : !torch.optional<int>, !torch.none -> !torch.bool
torch.prim.If %8 -> () {
%9 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int
%10 = torch.aten.floordiv.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.int
%11 = torch.aten._set_item.t %7, %9, %10 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>
torch.prim.If.yield
} else {
torch.prim.If.yield
}
return %7 : !torch.list<int>
}
* Inlining call: %7 = call @__torch__.torch_mlir.dialects.torch.importer.jit_ir.build_tools.upstream_shape_helpers._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bea0) {
%0 = "torch.constant.str"() {value = "AssertionError: invalid shape"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x62765d0) {
%0 = "torch.constant.str"() {value = "AssertionError: invalid shape"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620be40) {
%1 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620bea0) {
%0 = "torch.constant.bool"() {value = false} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bd90) {
%2 = "torch.constant.str"() {value = "AssertionError: invalid shape dimensions"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620be40) {
%0 = "torch.constant.str"() {value = "AssertionError: invalid shape dimensions"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bd30) {
%3 = "torch.constant.str"() {value = "AssertionError: only one dimension can be inferred"} : () -> !torch.str
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.str'(0x620bd90) {
%0 = "torch.constant.str"() {value = "AssertionError: only one dimension can be inferred"} : () -> !torch.str
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bcd0) {
%4 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bd30) {
%0 = "torch.constant.int"() {value = -1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620bc70) {
%5 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.bool'(0x620bcd0) {
%0 = "torch.constant.bool"() {value = true} : () -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x620bc10) {
%6 = "torch.constant.none"() : () -> !torch.none
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.none'(0x620bc70) {
%0 = "torch.constant.none"() : () -> !torch.none
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bbb0) {
%7 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bc10) {
%0 = "torch.constant.int"() {value = 1 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620c100) {
%8 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> success : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x620bbb0) {
%0 = "torch.constant.int"() {value = 0 : i64} : () -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Uninitialized'(0x620bf60) {
%9 = "torch.prim.Uninitialized"() : () -> !torch.int
* Pattern : 'torch.prim.Uninitialized -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.len.t'(0x620aa10) {
%10 = "torch.aten.len.t"(%arg0) : (!torch.list<int>) -> !torch.int
* Pattern : 'torch.aten.len.t -> ()' {
Trying to match ""
** Failure : operand not AtenSizeOp
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x6206fe0) {
%11 = "torch.derefine"(%2) : (!torch.none) -> !torch.optional<int>
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop'(0x620c170) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620ca50) {
%20 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x620cb00) {
%21 = "torch.aten.eq.int"(%20, %4) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620d260) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__isnot__'(0x620cc80) {
%23 = "torch.aten.__isnot__"(%arg4, %2) : (!torch.optional<int>, !torch.none) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620cfb0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x6209810) {
"torch.prim.RaiseException"(%5, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620cea0) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620cf50) {
"torch.prim.If.yield"() : () -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.derefine'(0x620d070) {
%24 = "torch.derefine"(%arg2) : (!torch.int) -> !torch.optional<int>
* Pattern : 'torch.derefine -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d0f0) {
"torch.prim.If.yield"(%arg3, %24) : (!torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620d1a0) {
%23 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.ge.int'(0x620d330) {
%24 = "torch.aten.ge.int"(%23, %0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620d740) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.__getitem__.t'(0x620d480) {
%26 = "torch.aten.__getitem__.t"(%arg0, %arg2) : (!torch.list<int>, !torch.int) -> !torch.int
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.aten.__getitem__.t -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.mul.int'(0x620d610) {
%27 = "torch.aten.mul.int"(%arg3, %26) : (!torch.int, !torch.int) -> !torch.int
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d6b0) {
"torch.prim.If.yield"(%27) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.RaiseException'(0x620cd20) {
"torch.prim.RaiseException"(%6, %2) : (!torch.str, !torch.none) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d570) {
"torch.prim.If.yield"(%9) : (!torch.int) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If.yield'(0x620d7f0) {
"torch.prim.If.yield"(%25, %arg4) : (!torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.Loop.condition'(0x620d890) {
"torch.prim.Loop.condition"(%3, %22#0, %22#1) : (!torch.bool, !torch.int, !torch.optional<int>) -> ()
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.eq.int'(0x620c310) {
%13 = "torch.aten.eq.int"(%arg1, %12#0) : (!torch.int, !torch.int) -> !torch.bool
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.prim.If'(0x620c4f0) {
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
** Failure : non-constant condition
"" result 0
} -> failure : pattern failed to match
* Pattern : 'torch.prim.If -> ()' {
Trying to match ""
"" result 0
} -> failure : pattern failed to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment