Created
May 11, 2024 05:03
-
-
Save archana-ramalingam/8f82199d30980f047956b955abaa1bdc to your computer and use it in GitHub Desktop.
torch-mlir-opt debug for reducelogsumexp mlir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Args: /home/archana/src/torch-mlir/build/bin/torch-mlir-opt --mlir-print-debuginfo --debug --mlir-print-ir-after-all --convert-torch-onnx-to-torch --convert-torch-to-linalg /home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir | |
Load new dialect in Context builtin | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ShapedType) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemRefLayoutAttrInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::TypedAttr) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ElementsAttr) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DistinctAttr) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::BytecodeOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SymbolOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpAsmOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionKindInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ConditionallySpeculatable) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemoryEffectOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ResourceBlobManagerDialectInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpAsmDialectInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::BytecodeDialectInterface) | |
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::OpTrait::ZeroOperands<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneRegion<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ZeroResults<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ZeroSuccessors<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::BytecodeOpInterface::Trait<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 func | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CallOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SymbolUserOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CallableOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::FunctionOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionBranchTerminatorOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DialectInlinerInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ConvertToLLVMPatternInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::bufferization::BufferizableOpInterface) | |
Load new dialect in Context cf | |
Load new dialect in Context arith | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::ArithFastMathInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::VectorUnrollOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::InferTypeOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::InferIntRangeInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::ArithIntegerOverflowFlagsInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CastOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::ArithRoundingModeInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::bufferization::BufferDeallocationOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ValueBoundsOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::BranchOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::AutomaticAllocationScope<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CallableOpInterface::Trait<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::FunctionOpInterface::Trait<Empty>) | |
Load new dialect in Context torch | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionBranchOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ZeroRegions<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneResult<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::NoneType>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ConstantLike<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ConditionallySpeculatable::Trait<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::AlwaysSpeculatableImplTrait<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemoryEffectOpInterface::Trait<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::AllowedInModuleInitializer<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::InferTypeOpInterface::Trait<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::VariadicRegions<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::VariadicResults<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::VariadicOperands<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::AllowsTypeRefinement<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::detail::OperatorOpGenericAdaptorBase::Properties) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::func::FuncOp>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::MemRefsNormalizable<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RegionBranchTerminatorOpInterface::Trait<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ReturnLike<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::IsTerminator<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::OpToOpPassAdaptor) | |
Load new dialect in Context complex | |
Load new dialect in Context linalg | |
Load new dialect in Context affine | |
Load new dialect in Context ub | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ub::PoisonAttrInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::affine::AffineDmaStartOp) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::affine::AffineMapAccessInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::affine::AffineDmaWaitOp) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::LoopLikeOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::affine::AffineReadOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::affine::AffineWriteOpInterface) | |
Load new dialect in Context math | |
Load new dialect in Context memref | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CopyOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::PromotableMemOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DestructurableAccessorOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::PromotableAllocationOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DestructurableAllocationOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ViewLikeOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ShapedDimOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ReifyRankedShapedTypeOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OffsetSizeAndStrideOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::bufferization::AllocationOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::RuntimeVerifiableOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DestructurableTypeInterface) | |
Load new dialect in Context tensor | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DestinationStyleOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::transform::FindPayloadReplacementOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SubsetOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SubsetInsertionOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::SubsetExtractionOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::TilingInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::AggregatedOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::LinalgOp) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::ContractionOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::ConvolutionOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::FillOpInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::mesh::ShardingInterface) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::PartialReductionOpInterface) | |
Load new dialect in Context torch_c | |
//===-------------------------------------------===// | |
Legalizing operation : 'func.func'(0x639c02483340) { | |
* Fold { | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DialectFoldInterface) | |
} -> FAILURE : unable to fold | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.none'(0x639c0246e060) { | |
%0 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.operator'(0x639c02482d20) { | |
%1 = "torch.operator"(%arg0) <{name = "onnx.ReduceLogSumExp"}> : (!torch.vtensor<[2,3,4],f32>) -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.operator -> ()' { | |
Trying to match "" | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::detail::ConstantIntOpGenericAdaptorBase::Properties) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::IntType>::Impl<Empty>) | |
** Insert : 'torch.constant.int'(0x639c024c38a0) | |
%int7 = torch.constant.int 7 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)castDType | |
** Insert : 'torch.constant.none'(0x639c024c3eb0) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::detail::ConstantBoolOpGenericAdaptorBase::Properties) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::BoolType>::Impl<Empty>) | |
** Insert : 'torch.constant.bool'(0x639c024eb800) | |
!torch.vtensor<[2,3,4],f64>f64ResultType | |
** Insert : 'torch.aten.to.dtype'(0x639c02430120) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::Type>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<5>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::ReadOnly<Empty>) | |
%0 = torch.aten.to.dtype %arg0, %int7, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)AtenToDtypeOp | |
** Insert : 'torch.aten.exp'(0x639c024eebd0) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneOperand<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::HasValueSemantics<Empty>) | |
%1 = torch.aten.exp %0 : !torch.vtensor<[2,3,4],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)AtenExpOp | |
!torch.vtensor<[1,1,1],f64>f64ReduceType | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::ListType>::Impl<Empty>) | |
** Insert : 'torch.prim.ListConstruct'(0x639c024ef0a0) | |
** Insert : 'torch.constant.bool'(0x639c024ef110) | |
** Insert : 'torch.constant.none'(0x639c024ebd60) | |
** Insert : 'torch.aten.sum.dim_IntList'(0x639c0245fbd0) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<4>::Impl<Empty>) | |
%3 = torch.aten.sum.dim_IntList %1, %2, %true, %none_1 : !torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)reducedSumImpl | |
** Insert : 'torch.aten.log'(0x639c024ef2a0) | |
%4 = torch.aten.log %3 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)AtenLogOp | |
** Insert : 'torch.constant.int'(0x639c024ee910) | |
** Insert : 'torch.aten.to.dtype'(0x639c02430010) | |
** Replace : 'torch.operator'(0x639c02482d20) | |
%4 = torch.aten.log %3 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)finalResult | |
"" result 1 | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.int'(0x639c024c38a0) { | |
%1 = "torch.constant.int"() <{value = 7 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.none'(0x639c024c3eb0) { | |
%2 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.bool'(0x639c024eb800) { | |
%3 = "torch.constant.bool"() <{value = false}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.to.dtype'(0x639c02430120) { | |
%4 = "torch.aten.to.dtype"(%arg0, %1, %3, %3, %2) : (!torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.exp'(0x639c024eebd0) { | |
%5 = "torch.aten.exp"(%4) : (!torch.vtensor<[2,3,4],f64>) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.prim.ListConstruct'(0x639c024ef0a0) { | |
%6 = "torch.prim.ListConstruct"() : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.bool'(0x639c024ef110) { | |
%7 = "torch.constant.bool"() <{value = true}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.none'(0x639c024ebd60) { | |
%8 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.sum.dim_IntList'(0x639c0245fbd0) { | |
%9 = "torch.aten.sum.dim_IntList"(%5, %6, %7, %8) : (!torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.log'(0x639c024ef2a0) { | |
%10 = "torch.aten.log"(%9) : (!torch.vtensor<[1,1,1],f64>) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.int'(0x639c024ee910) { | |
%11 = "torch.constant.int"() <{value = 6 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.to.dtype'(0x639c02430010) { | |
%12 = "torch.aten.to.dtype"(%10, %11, %3, %3, %2) : (!torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none) -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
} -> SUCCESS : pattern applied successfully | |
// *** IR Dump After Pattern Application *** | |
func.func @reducelogsumexp_graph(%arg0: !torch.vtensor<[2,3,4],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:36)) -> !torch.vtensor<[1,1,1],f32> attributes {torch.onnx_meta.ir_version = 9 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} { | |
%none = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
%int7 = torch.constant.int 7 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_0 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%false = torch.constant.bool false loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%0 = torch.aten.to.dtype %arg0, %int7, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%1 = torch.aten.exp %0 : !torch.vtensor<[2,3,4],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%2 = torch.prim.ListConstruct : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%true = torch.constant.bool true loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_1 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%3 = torch.aten.sum.dim_IntList %1, %2, %true, %none_1 : !torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%4 = torch.aten.log %3 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%int6 = torch.constant.int 6 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%5 = torch.aten.to.dtype %4, %int6, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%6 = torch.operator "onnx.ReduceLogSumExp"(%arg0) : (!torch.vtensor<[2,3,4],f32>) -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
return %6 : !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
} loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:3) | |
} -> SUCCESS | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'func.return'(0x639c02483220) { | |
"func.return"(%13) : (!torch.vtensor<[1,1,1],f32>) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
* Fold { | |
} -> FAILURE : unable to fold | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::PreservedAnalyses::AllAnalysesType) | |
// -----// IR Dump After ConvertTorchOnnxToTorch (convert-torch-onnx-to-torch) //----- // | |
func.func @reducelogsumexp_graph(%arg0: !torch.vtensor<[2,3,4],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:36)) -> !torch.vtensor<[1,1,1],f32> attributes {torch.onnx_meta.ir_version = 9 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} { | |
%none = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
%int7 = torch.constant.int 7 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_0 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%false = torch.constant.bool false loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%0 = torch.aten.to.dtype %arg0, %int7, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%1 = torch.aten.exp %0 : !torch.vtensor<[2,3,4],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%2 = torch.prim.ListConstruct : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%true = torch.constant.bool true loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_1 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%3 = torch.aten.sum.dim_IntList %1, %2, %true, %none_1 : !torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%4 = torch.aten.log %3 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%int6 = torch.constant.int 6 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%5 = torch.aten.to.dtype %4, %int6, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
return %5 : !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
} loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:3) | |
//===-------------------------------------------===// | |
Legalizing operation : 'func.func'(0x639c02483340) { | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.none'(0x639c0246e060) { | |
%0 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Failure : not a supported reduce op | |
"(anonymous namespace)::ConvertReductionOp" result 0 | |
} -> FAILURE : pattern failed to match | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.int'(0x639c024c38a0) { | |
%1 = "torch.constant.int"() <{value = 7 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.constant.int -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.int -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.int -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Failure : not a supported reduce op | |
"(anonymous namespace)::ConvertReductionOp" result 0 | |
} -> FAILURE : pattern failed to match | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.none'(0x639c024c3eb0) { | |
%2 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Failure : not a supported reduce op | |
"(anonymous namespace)::ConvertReductionOp" result 0 | |
} -> FAILURE : pattern failed to match | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.bool'(0x639c024eb800) { | |
%3 = "torch.constant.bool"() <{value = false}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.constant.bool -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.bool -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.bool -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Failure : not a supported reduce op | |
"(anonymous namespace)::ConvertReductionOp" result 0 | |
} -> FAILURE : pattern failed to match | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.to.dtype'(0x639c02430120) { | |
%4 = "torch.aten.to.dtype"(%arg0, %1, %3, %3, %2) : (!torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.aten.to.dtype -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.aten.to.dtype -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::detail::ConstantOpGenericAdaptorBase::Properties) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::InferIntRangeInterface::Trait<Empty>) | |
** Insert : 'arith.constant'(0x639c024f60f0) | |
** Insert : 'arith.constant'(0x639c024e9e80) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::IndexType>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<2>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ShapedDimOpInterface::Trait<Empty>) | |
** Insert : 'arith.constant'(0x639c024e9fa0) | |
** Insert : 'arith.constant'(0x639c024ea080) | |
** Insert : 'arith.constant'(0x639c024e93e0) | |
** Insert : 'arith.constant'(0x639c024e9480) | |
** Insert : 'arith.constant'(0x639c024e9520) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::RankedTensorType>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ReifyRankedShapedTypeOpInterface::Trait<Empty>) | |
** Insert : 'tensor.empty'(0x639c024e9a70) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::detail::GenericOpGenericAdaptorBase::Properties) | |
** Insert Block into detached Region (nullptr parent op)' ** Insert : 'arith.extf'(0x639c024fa8f0) | |
** Insert : 'linalg.yield'(0x639c024fa9a0) | |
** Insert : 'linalg.generic'(0x639c02451530) | |
** Insert : 'tensor.cast'(0x639c024faa90) | |
** Replace : 'torch.aten.to.dtype'(0x639c02430120) | |
"(anonymous namespace)::ConvertElementwiseOp" result 1 | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024f60f0) { | |
%7 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024e9e80) { | |
%8 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024e9fa0) { | |
%9 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024ea080) { | |
%10 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024e93e0) { | |
%11 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024e9480) { | |
%12 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024e9520) { | |
%13 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.empty'(0x639c024e9a70) { | |
%14 = "tensor.empty"() : () -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.extf'(0x639c024fa8f0) { | |
%26 = "arith.extf"(%arg1) : (f32) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.yield'(0x639c024fa9a0) { | |
"linalg.yield"(%26) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.generic'(0x639c02451530) { | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.cast'(0x639c024faa90) { | |
%16 = "tensor.cast"(%15) : (tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
} -> SUCCESS : pattern applied successfully | |
// *** IR Dump After Pattern Application *** | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SingleBlockImplicitTerminator<mlir::linalg::YieldOp>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::AttrSizedOperandSegments<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DestinationStyleOpInterface::Trait<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::LinalgOp::Trait<Empty>) | |
func.func @reducelogsumexp_graph(%arg0: !torch.vtensor<[2,3,4],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:36)) -> !torch.vtensor<[1,1,1],f32> attributes {torch.onnx_meta.ir_version = 9 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} { | |
%0 = builtin.unrealized_conversion_cast %arg0 : !torch.vtensor<[2,3,4],f32> to tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
%int7 = torch.constant.int 7 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%1 = builtin.unrealized_conversion_cast %int7 : !torch.int to i64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_0 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%false = torch.constant.bool false loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%2 = builtin.unrealized_conversion_cast %false : !torch.bool to i1 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c0 = arith.constant 0 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_1 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c3 = arith.constant 3 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2_2 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c4 = arith.constant 4 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%3 = tensor.empty() : tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%4 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0 : tensor<2x3x4xf32>) outs(%3 : tensor<2x3x4xf64>) { | |
^bb0(%in: f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %out: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%11 = arith.extf %in : f32 to f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
linalg.yield %11 : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%cast = tensor.cast %4 : tensor<2x3x4xf64> to tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%5 = torch.aten.to.dtype %arg0, %int7, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%6 = torch.aten.exp %5 : !torch.vtensor<[2,3,4],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%7 = torch.prim.ListConstruct : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%true = torch.constant.bool true loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_3 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%8 = torch.aten.sum.dim_IntList %6, %7, %true, %none_3 : !torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%9 = torch.aten.log %8 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%int6 = torch.constant.int 6 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%10 = torch.aten.to.dtype %9, %int6, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
return %10 : !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
} loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:3) | |
} -> SUCCESS | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.exp'(0x639c024eebd0) { | |
%18 = "torch.aten.exp"(%17) : (!torch.vtensor<[2,3,4],f64>) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.aten.exp -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.aten.exp -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Insert : 'arith.constant'(0x639c024fe220) | |
** Insert : 'arith.constant'(0x639c024fe290) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::TensorType>::Impl<Empty>) | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CastOpInterface::Trait<Empty>) | |
** Insert : 'arith.constant'(0x639c024fe300) | |
** Insert : 'arith.constant'(0x639c024fd1d0) | |
** Insert : 'arith.constant'(0x639c024fd240) | |
** Insert : 'arith.constant'(0x639c024fd2b0) | |
** Insert : 'arith.constant'(0x639c024ff3b0) | |
** Insert : 'tensor.empty'(0x639c024ff420) | |
** Insert Block into detached Region (nullptr parent op)'ImplicitTypeIDRegistry::lookupOrInsert(mlir::math::detail::ExpOpGenericAdaptorBase::Properties) | |
** Insert : 'math.exp'(0x639c024fd000) | |
** Insert : 'linalg.yield'(0x639c024ff960) | |
** Insert : 'linalg.generic'(0x639c02445080) | |
** Insert : 'tensor.cast'(0x639c024ebdf0) | |
** Replace : 'torch.aten.exp'(0x639c024eebd0) | |
"(anonymous namespace)::ConvertElementwiseOp" result 1 | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024fe220) { | |
%18 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024fe290) { | |
%19 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024fe300) { | |
%20 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024fd1d0) { | |
%21 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024fd240) { | |
%22 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024fd2b0) { | |
%23 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024ff3b0) { | |
%24 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.empty'(0x639c024ff420) { | |
%25 = "tensor.empty"() : () -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'math.exp'(0x639c024fd000) { | |
%36 = "math.exp"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.yield'(0x639c024ff960) { | |
"linalg.yield"(%36) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.generic'(0x639c02445080) { | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.cast'(0x639c024ebdf0) { | |
%27 = "tensor.cast"(%26) : (tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
} -> SUCCESS : pattern applied successfully | |
// *** IR Dump After Pattern Application *** | |
func.func @reducelogsumexp_graph(%arg0: !torch.vtensor<[2,3,4],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:36)) -> !torch.vtensor<[1,1,1],f32> attributes {torch.onnx_meta.ir_version = 9 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} { | |
%0 = builtin.unrealized_conversion_cast %arg0 : !torch.vtensor<[2,3,4],f32> to tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
%int7 = torch.constant.int 7 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%1 = builtin.unrealized_conversion_cast %int7 : !torch.int to i64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_0 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%false = torch.constant.bool false loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%2 = builtin.unrealized_conversion_cast %false : !torch.bool to i1 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c0 = arith.constant 0 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_1 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c3 = arith.constant 3 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2_2 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c4 = arith.constant 4 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%3 = tensor.empty() : tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%4 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0 : tensor<2x3x4xf32>) outs(%3 : tensor<2x3x4xf64>) { | |
^bb0(%in: f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %out: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%13 = arith.extf %in : f32 to f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
linalg.yield %13 : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%cast = tensor.cast %4 : tensor<2x3x4xf64> to tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%5 = torch.aten.to.dtype %arg0, %int7, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_3 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c0_4 = arith.constant 0 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2_5 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_6 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c3_7 = arith.constant 3 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2_8 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c4_9 = arith.constant 4 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%6 = tensor.empty() : tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%7 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cast : tensor<2x3x4xf64>) outs(%6 : tensor<2x3x4xf64>) { | |
^bb0(%in: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %out: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%13 = math.exp %in : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
linalg.yield %13 : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%cast_10 = tensor.cast %7 : tensor<2x3x4xf64> to tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%8 = torch.aten.exp %5 : !torch.vtensor<[2,3,4],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%9 = torch.prim.ListConstruct : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%true = torch.constant.bool true loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_11 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%10 = torch.aten.sum.dim_IntList %8, %9, %true, %none_11 : !torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%11 = torch.aten.log %10 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%int6 = torch.constant.int 6 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%12 = torch.aten.to.dtype %11, %int6, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
return %12 : !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
} loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:3) | |
} -> SUCCESS | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.prim.ListConstruct'(0x639c024ef0a0) { | |
%29 = "torch.prim.ListConstruct"() : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.prim.ListConstruct -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.prim.ListConstruct -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.prim.ListConstruct -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Failure : not a supported reduce op | |
"(anonymous namespace)::ConvertReductionOp" result 0 | |
} -> FAILURE : pattern failed to match | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.bool'(0x639c024ef110) { | |
%30 = "torch.constant.bool"() <{value = true}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.constant.bool -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.bool -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.bool -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Failure : not a supported reduce op | |
"(anonymous namespace)::ConvertReductionOp" result 0 | |
} -> FAILURE : pattern failed to match | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.none'(0x639c024ebd60) { | |
%31 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.none -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Failure : not a supported reduce op | |
"(anonymous namespace)::ConvertReductionOp" result 0 | |
} -> FAILURE : pattern failed to match | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.sum.dim_IntList'(0x639c0245fbd0) { | |
%32 = "torch.aten.sum.dim_IntList"(%28, %29, %30, %31) : (!torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.aten.sum.dim_IntList -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.aten.sum.dim_IntList -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.aten.sum.dim_IntList -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Insert : 'arith.constant'(0x639c02502b10) | |
** Insert : 'arith.constant'(0x639c02502b80) | |
** Insert : 'arith.constant'(0x639c02502bf0) | |
** Insert : 'tensor.dim'(0x639c024e9ef0) | |
** Insert : 'arith.constant'(0x639c02502c60) | |
** Insert : 'tensor.dim'(0x639c02502e70) | |
** Insert : 'arith.constant'(0x639c02502cd0) | |
** Insert : 'tensor.dim'(0x639c02502f50) | |
** Insert : 'tensor.empty'(0x639c02503030) | |
** Insert Block into detached Region (nullptr parent op)' ** Insert : 'linalg.yield'(0x639c02500070) | |
** Insert : 'linalg.fill'(0x639c02500130) | |
** Insert Block into detached Region (nullptr parent op)'ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::detail::AddFOpGenericAdaptorBase::Properties) | |
** Insert : 'arith.addf'(0x639c025010c0) | |
** Insert : 'linalg.yield'(0x639c02501190) | |
** Insert : 'linalg.generic'(0x639c02444eb0) | |
** Insert : 'tensor.cast'(0x639c02501280) | |
** Replace : 'torch.aten.sum.dim_IntList'(0x639c0245fbd0) | |
"(anonymous namespace)::ConvertReductionOp" result 1 | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02502b10) { | |
%33 = "arith.constant"() <{value = 0.000000e+00 : f64}> : () -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02502b80) { | |
%34 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02502bf0) { | |
%35 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.dim'(0x639c024e9ef0) { | |
%36 = "tensor.dim"(%27, %35) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02502c60) { | |
%37 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.dim'(0x639c02502e70) { | |
%38 = "tensor.dim"(%27, %37) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02502cd0) { | |
%39 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.dim'(0x639c02502f50) { | |
%40 = "tensor.dim"(%27, %39) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.empty'(0x639c02503030) { | |
%41 = "tensor.empty"() : () -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.yield'(0x639c02500070) { | |
"linalg.yield"(%arg3) : (f64) -> () loc(unknown) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.fill'(0x639c02500130) { | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.addf'(0x639c025010c0) { | |
%49 = "arith.addf"(%arg1, %arg2) <{fastmath = #arith.fastmath<none>}> : (f64, f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.yield'(0x639c02501190) { | |
"linalg.yield"(%49) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.generic'(0x639c02444eb0) { | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.cast'(0x639c02501280) { | |
%44 = "tensor.cast"(%43) : (tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
} -> SUCCESS : pattern applied successfully | |
// *** IR Dump After Pattern Application *** | |
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::FillOpInterface::Trait<Empty>) | |
func.func @reducelogsumexp_graph(%arg0: !torch.vtensor<[2,3,4],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:36)) -> !torch.vtensor<[1,1,1],f32> attributes {torch.onnx_meta.ir_version = 9 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} { | |
%0 = builtin.unrealized_conversion_cast %arg0 : !torch.vtensor<[2,3,4],f32> to tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
%int7 = torch.constant.int 7 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%1 = builtin.unrealized_conversion_cast %int7 : !torch.int to i64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_0 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%false = torch.constant.bool false loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%2 = builtin.unrealized_conversion_cast %false : !torch.bool to i1 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c0 = arith.constant 0 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_1 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c3 = arith.constant 3 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2_2 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c4 = arith.constant 4 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%3 = tensor.empty() : tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%4 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0 : tensor<2x3x4xf32>) outs(%3 : tensor<2x3x4xf64>) { | |
^bb0(%in: f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %out: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%17 = arith.extf %in : f32 to f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
linalg.yield %17 : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%cast = tensor.cast %4 : tensor<2x3x4xf64> to tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%5 = torch.aten.to.dtype %arg0, %int7, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_3 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c0_4 = arith.constant 0 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2_5 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_6 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c3_7 = arith.constant 3 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2_8 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c4_9 = arith.constant 4 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%6 = tensor.empty() : tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%7 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%cast : tensor<2x3x4xf64>) outs(%6 : tensor<2x3x4xf64>) { | |
^bb0(%in: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %out: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%17 = math.exp %in : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
linalg.yield %17 : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%cast_10 = tensor.cast %7 : tensor<2x3x4xf64> to tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%8 = torch.aten.exp %5 : !torch.vtensor<[2,3,4],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%9 = torch.prim.ListConstruct : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%true = torch.constant.bool true loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%10 = builtin.unrealized_conversion_cast %true : !torch.bool to i1 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%none_11 = torch.constant.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%cst = arith.constant 0.000000e+00 : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_12 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c0_13 = arith.constant 0 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%dim = tensor.dim %cast_10, %c0_13 : tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c1_14 = arith.constant 1 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%dim_15 = tensor.dim %cast_10, %c1_14 : tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%c2_16 = arith.constant 2 : index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%dim_17 = tensor.dim %cast_10, %c2_16 : tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%11 = tensor.empty() : tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%12 = linalg.fill ins(%cst : f64) outs(%11 : tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%13 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (0, 0, 0)>], iterator_types = ["reduction", "reduction", "reduction"]} ins(%cast_10 : tensor<2x3x4xf64>) outs(%12 : tensor<1x1x1xf64>) { | |
^bb0(%in: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %out: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%17 = arith.addf %in, %out : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
linalg.yield %17 : f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%cast_18 = tensor.cast %13 : tensor<1x1x1xf64> to tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%14 = torch.aten.sum.dim_IntList %8, %9, %true, %none_11 : !torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%15 = torch.aten.log %14 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%int6 = torch.constant.int 6 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%16 = torch.aten.to.dtype %15, %int6, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
return %16 : !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
} loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:3) | |
} -> SUCCESS | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.log'(0x639c024ef2a0) { | |
%46 = "torch.aten.log"(%45) : (!torch.vtensor<[1,1,1],f64>) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.aten.log -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.aten.log -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Insert : 'arith.constant'(0x639c02501310) | |
** Insert : 'tensor.empty'(0x639c025044b0) | |
** Insert Block into detached Region (nullptr parent op)'ImplicitTypeIDRegistry::lookupOrInsert(mlir::math::detail::LogOpGenericAdaptorBase::Properties) | |
** Insert : 'math.log'(0x639c02504320) | |
** Insert : 'linalg.yield'(0x639c02504580) | |
** Insert : 'linalg.generic'(0x639c02442ea0) | |
** Insert : 'tensor.cast'(0x639c02501fa0) | |
** Replace : 'torch.aten.log'(0x639c024ef2a0) | |
"(anonymous namespace)::ConvertElementwiseOp" result 1 | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02501310) { | |
%46 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.empty'(0x639c025044b0) { | |
%47 = "tensor.empty"() : () -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'math.log'(0x639c02504320) { | |
%53 = "math.log"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.yield'(0x639c02504580) { | |
"linalg.yield"(%53) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.generic'(0x639c02442ea0) { | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.cast'(0x639c02501fa0) { | |
%49 = "tensor.cast"(%48) : (tensor<1x1x1xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
} -> SUCCESS : pattern applied successfully | |
// *** IR Dump After Pattern Application *** | |
'tensor.cast' op operand type 'tensor<1x1x1xf64>' and result type 'tensor<2x3x4xf64>' are cast incompatible | |
mlir-asm-printer: 'func.func' failed to verify and will be printed in generic form | |
"func.func"() <{function_type = (!torch.vtensor<[2,3,4],f32>) -> !torch.vtensor<[1,1,1],f32>, sym_name = "reducelogsumexp_graph"}> ({ | |
^bb0(%arg0: !torch.vtensor<[2,3,4],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:36)): | |
%0 = "builtin.unrealized_conversion_cast"(%arg0) : (!torch.vtensor<[2,3,4],f32>) -> tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%1 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
%2 = "torch.constant.int"() <{value = 7 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%3 = "builtin.unrealized_conversion_cast"(%2) : (!torch.int) -> i64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%4 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%5 = "torch.constant.bool"() <{value = false}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%6 = "builtin.unrealized_conversion_cast"(%5) : (!torch.bool) -> i1 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%7 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%8 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%9 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%10 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%11 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%12 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%13 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%14 = "tensor.empty"() : () -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%15 = "linalg.generic"(%0, %14) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg9: f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg10: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%56 = "arith.extf"(%arg9) : (f32) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%56) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf32>, tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%16 = "tensor.cast"(%15) : (tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%17 = "torch.aten.to.dtype"(%arg0, %2, %5, %5, %4) : (!torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%18 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%19 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%20 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%21 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%22 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%23 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%24 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%25 = "tensor.empty"() : () -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%26 = "linalg.generic"(%16, %25) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg7: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg8: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%55 = "math.exp"(%arg7) <{fastmath = #arith.fastmath<none>}> : (f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%55) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf64>, tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%27 = "tensor.cast"(%26) : (tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%28 = "torch.aten.exp"(%17) : (!torch.vtensor<[2,3,4],f64>) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%29 = "torch.prim.ListConstruct"() : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%30 = "torch.constant.bool"() <{value = true}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%31 = "builtin.unrealized_conversion_cast"(%30) : (!torch.bool) -> i1 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%32 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%33 = "arith.constant"() <{value = 0.000000e+00 : f64}> : () -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%34 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%35 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%36 = "tensor.dim"(%27, %35) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%37 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%38 = "tensor.dim"(%27, %37) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%39 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%40 = "tensor.dim"(%27, %39) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%41 = "tensor.empty"() : () -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%42 = "linalg.fill"(%33, %41) <{operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg5: f64 loc(unknown), %arg6: f64 loc(unknown)): | |
"linalg.yield"(%arg5) : (f64) -> () loc(unknown) | |
}) : (f64, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%43 = "linalg.generic"(%27, %42) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (0, 0, 0)>], iterator_types = [#linalg.iterator_type<reduction>, #linalg.iterator_type<reduction>, #linalg.iterator_type<reduction>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg3: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg4: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%54 = "arith.addf"(%arg3, %arg4) <{fastmath = #arith.fastmath<none>}> : (f64, f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%54) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf64>, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%44 = "tensor.cast"(%43) : (tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%45 = "torch.aten.sum.dim_IntList"(%28, %29, %30, %32) : (!torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%46 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%47 = "tensor.empty"() : () -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%48 = "linalg.generic"(%44, %47) <{indexing_maps = [affine_map<(d0, d1, d2) -> (0, 0, 0)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg1: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg2: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%53 = "math.log"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%53) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<1x1x1xf64>, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%49 = "tensor.cast"(%48) : (tensor<1x1x1xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%50 = "torch.aten.log"(%45) : (!torch.vtensor<[1,1,1],f64>) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%51 = "torch.constant.int"() <{value = 6 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%52 = "torch.aten.to.dtype"(%50, %51, %5, %5, %4) : (!torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none) -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"func.return"(%52) : (!torch.vtensor<[1,1,1],f32>) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
}) {torch.onnx_meta.ir_version = 9 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} : () -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:3) | |
} -> SUCCESS | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.constant.int'(0x639c024ee910) { | |
%51 = "torch.constant.int"() <{value = 6 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.constant.int -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.int -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Failure : not a supported elementwise op | |
"(anonymous namespace)::ConvertElementwiseOp" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.constant.int -> ()' { | |
Trying to match "(anonymous namespace)::ConvertReductionOp" | |
** Failure : not a supported reduce op | |
"(anonymous namespace)::ConvertReductionOp" result 0 | |
} -> FAILURE : pattern failed to match | |
} -> FAILURE : no matched legalization pattern | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'torch.aten.to.dtype'(0x639c02430010) { | |
%52 = "torch.aten.to.dtype"(%50, %51, %5, %5, %4) : (!torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none) -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
* Fold { | |
} -> FAILURE : unable to fold | |
* Pattern : 'torch.aten.to.dtype -> ()' { | |
Trying to match "(anonymous namespace)::ConvertAtenScalarToTensorLike" | |
** Failure : not a supported Scalar to Tensor like op | |
"(anonymous namespace)::ConvertAtenScalarToTensorLike" result 0 | |
} -> FAILURE : pattern failed to match | |
* Pattern : 'torch.aten.to.dtype -> ()' { | |
Trying to match "(anonymous namespace)::ConvertElementwiseOp" | |
** Insert : 'arith.constant'(0x639c02501ab0) | |
** Insert : 'arith.constant'(0x639c024c6b90) | |
** Insert : 'arith.constant'(0x639c025062a0) | |
** Insert : 'arith.constant'(0x639c02506310) | |
** Insert : 'arith.constant'(0x639c02506380) | |
** Insert : 'arith.constant'(0x639c02506420) | |
** Insert : 'arith.constant'(0x639c025064c0) | |
** Insert : 'tensor.empty'(0x639c02506560) | |
** Insert Block into detached Region (nullptr parent op)' ** Insert : 'arith.truncf'(0x639c025072f0) | |
** Insert : 'linalg.yield'(0x639c024c6b00) | |
** Insert : 'linalg.generic'(0x639c0242ff20) | |
** Insert : 'tensor.cast'(0x639c02507410) | |
** Replace : 'torch.aten.to.dtype'(0x639c02430010) | |
"(anonymous namespace)::ConvertElementwiseOp" result 1 | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02501ab0) { | |
%53 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c024c6b90) { | |
%54 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c025062a0) { | |
%55 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02506310) { | |
%56 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02506380) { | |
%57 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c02506420) { | |
%58 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.constant'(0x639c025064c0) { | |
%59 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.empty'(0x639c02506560) { | |
%60 = "tensor.empty"() : () -> tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'arith.truncf'(0x639c025072f0) { | |
%64 = "arith.truncf"(%arg1) : (f64) -> f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.yield'(0x639c024c6b00) { | |
"linalg.yield"(%64) : (f32) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'linalg.generic'(0x639c0242ff20) { | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'tensor.cast'(0x639c02507410) { | |
%62 = "tensor.cast"(%61) : (tensor<2x3x4xf32>) -> tensor<1x1x1xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
} -> SUCCESS : pattern applied successfully | |
// *** IR Dump After Pattern Application *** | |
'tensor.cast' op operand type 'tensor<1x1x1xf64>' and result type 'tensor<2x3x4xf64>' are cast incompatible | |
mlir-asm-printer: 'func.func' failed to verify and will be printed in generic form | |
"func.func"() <{function_type = (!torch.vtensor<[2,3,4],f32>) -> !torch.vtensor<[1,1,1],f32>, sym_name = "reducelogsumexp_graph"}> ({ | |
^bb0(%arg0: !torch.vtensor<[2,3,4],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:36)): | |
%0 = "builtin.unrealized_conversion_cast"(%arg0) : (!torch.vtensor<[2,3,4],f32>) -> tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%1 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
%2 = "torch.constant.int"() <{value = 7 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%3 = "builtin.unrealized_conversion_cast"(%2) : (!torch.int) -> i64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%4 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%5 = "torch.constant.bool"() <{value = false}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%6 = "builtin.unrealized_conversion_cast"(%5) : (!torch.bool) -> i1 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%7 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%8 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%9 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%10 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%11 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%12 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%13 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%14 = "tensor.empty"() : () -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%15 = "linalg.generic"(%0, %14) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg11: f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg12: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%68 = "arith.extf"(%arg11) : (f32) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%68) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf32>, tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%16 = "tensor.cast"(%15) : (tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%17 = "torch.aten.to.dtype"(%arg0, %2, %5, %5, %4) : (!torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%18 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%19 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%20 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%21 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%22 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%23 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%24 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%25 = "tensor.empty"() : () -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%26 = "linalg.generic"(%16, %25) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg9: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg10: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%67 = "math.exp"(%arg9) <{fastmath = #arith.fastmath<none>}> : (f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%67) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf64>, tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%27 = "tensor.cast"(%26) : (tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%28 = "torch.aten.exp"(%17) : (!torch.vtensor<[2,3,4],f64>) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%29 = "torch.prim.ListConstruct"() : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%30 = "torch.constant.bool"() <{value = true}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%31 = "builtin.unrealized_conversion_cast"(%30) : (!torch.bool) -> i1 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%32 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%33 = "arith.constant"() <{value = 0.000000e+00 : f64}> : () -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%34 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%35 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%36 = "tensor.dim"(%27, %35) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%37 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%38 = "tensor.dim"(%27, %37) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%39 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%40 = "tensor.dim"(%27, %39) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%41 = "tensor.empty"() : () -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%42 = "linalg.fill"(%33, %41) <{operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg7: f64 loc(unknown), %arg8: f64 loc(unknown)): | |
"linalg.yield"(%arg7) : (f64) -> () loc(unknown) | |
}) : (f64, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%43 = "linalg.generic"(%27, %42) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (0, 0, 0)>], iterator_types = [#linalg.iterator_type<reduction>, #linalg.iterator_type<reduction>, #linalg.iterator_type<reduction>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg5: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg6: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%66 = "arith.addf"(%arg5, %arg6) <{fastmath = #arith.fastmath<none>}> : (f64, f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%66) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf64>, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%44 = "tensor.cast"(%43) : (tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%45 = "torch.aten.sum.dim_IntList"(%28, %29, %30, %32) : (!torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none) -> !torch.vtensor<[1,1,1],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%46 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%47 = "tensor.empty"() : () -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%48 = "linalg.generic"(%44, %47) <{indexing_maps = [affine_map<(d0, d1, d2) -> (0, 0, 0)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg3: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg4: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%65 = "math.log"(%arg3) <{fastmath = #arith.fastmath<none>}> : (f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%65) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<1x1x1xf64>, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%49 = "tensor.cast"(%48) : (tensor<1x1x1xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%50 = "torch.aten.log"(%45) : (!torch.vtensor<[1,1,1],f64>) -> !torch.vtensor<[2,3,4],f64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%51 = "torch.constant.int"() <{value = 6 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%52 = "builtin.unrealized_conversion_cast"(%51) : (!torch.int) -> i64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%53 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%54 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%55 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%56 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%57 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%58 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%59 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%60 = "tensor.empty"() : () -> tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%61 = "linalg.generic"(%49, %60) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg1: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg2: f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%64 = "arith.truncf"(%arg1) : (f64) -> f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%64) : (f32) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf64>, tensor<2x3x4xf32>) -> tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%62 = "tensor.cast"(%61) : (tensor<2x3x4xf32>) -> tensor<1x1x1xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%63 = "torch.aten.to.dtype"(%50, %51, %5, %5, %4) : (!torch.vtensor<[2,3,4],f64>, !torch.int, !torch.bool, !torch.bool, !torch.none) -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"func.return"(%63) : (!torch.vtensor<[1,1,1],f32>) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
}) {torch.onnx_meta.ir_version = 9 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} : () -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:3) | |
} -> SUCCESS | |
//===-------------------------------------------===// | |
//===-------------------------------------------===// | |
Legalizing operation : 'func.return'(0x639c02483220) { | |
"func.return"(%63) : (!torch.vtensor<[1,1,1],f32>) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
} -> SUCCESS : operation marked legal by the target | |
//===-------------------------------------------===// | |
** Insert : 'torch_c.to_builtin_tensor'(0x639c025075a0) | |
** Insert : 'torch_c.from_builtin_tensor'(0x639c02504bc0) | |
/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir:4:10: error: 'tensor.cast' op operand type 'tensor<1x1x1xf64>' and result type 'tensor<2x3x4xf64>' are cast incompatible | |
%0 = torch.operator "onnx.ReduceLogSumExp"(%arg0) : (!torch.vtensor<[2,3,4],f32>) -> !torch.vtensor<[1,1,1],f32> | |
^ | |
/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir:4:10: note: see current operation: %43 = "tensor.cast"(%42) : (tensor<1x1x1xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
// -----// IR Dump After ConvertTorchToLinalg Failed (convert-torch-to-linalg) //----- // | |
'tensor.cast' op operand type 'tensor<1x1x1xf64>' and result type 'tensor<2x3x4xf64>' are cast incompatible | |
mlir-asm-printer: 'func.func' failed to verify and will be printed in generic form | |
"func.func"() <{function_type = (!torch.vtensor<[2,3,4],f32>) -> !torch.vtensor<[1,1,1],f32>, sym_name = "reducelogsumexp_graph"}> ({ | |
^bb0(%arg0: !torch.vtensor<[2,3,4],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:36)): | |
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[2,3,4],f32>) -> tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%1 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":3:13) | |
%2 = "torch.constant.int"() <{value = 7 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%3 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%4 = "torch.constant.bool"() <{value = false}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%7 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%9 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%11 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%12 = "tensor.empty"() : () -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%13 = "linalg.generic"(%0, %12) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg11: f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg12: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%60 = "arith.extf"(%arg11) : (f32) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%60) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf32>, tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%14 = "tensor.cast"(%13) : (tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%15 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%16 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%17 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%18 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%19 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%20 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%21 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%22 = "tensor.empty"() : () -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%23 = "linalg.generic"(%14, %22) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg9: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg10: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%59 = "math.exp"(%arg9) <{fastmath = #arith.fastmath<none>}> : (f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%59) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf64>, tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%24 = "tensor.cast"(%23) : (tensor<2x3x4xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%25 = "torch.prim.ListConstruct"() : () -> !torch.list<int> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%26 = "torch.constant.bool"() <{value = true}> : () -> !torch.bool loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%27 = "torch.constant.none"() : () -> !torch.none loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%28 = "arith.constant"() <{value = 0.000000e+00 : f64}> : () -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%29 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%30 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%31 = "tensor.dim"(%24, %30) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%32 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%33 = "tensor.dim"(%24, %32) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%34 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%35 = "tensor.dim"(%24, %34) : (tensor<2x3x4xf64>, index) -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%36 = "tensor.empty"() : () -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%37 = "linalg.fill"(%28, %36) <{operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg7: f64 loc(unknown), %arg8: f64 loc(unknown)): | |
"linalg.yield"(%arg7) : (f64) -> () loc(unknown) | |
}) : (f64, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%38 = "linalg.generic"(%24, %37) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (0, 0, 0)>], iterator_types = [#linalg.iterator_type<reduction>, #linalg.iterator_type<reduction>, #linalg.iterator_type<reduction>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg5: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg6: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%58 = "arith.addf"(%arg5, %arg6) <{fastmath = #arith.fastmath<none>}> : (f64, f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%58) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf64>, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%39 = "tensor.cast"(%38) : (tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%40 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%41 = "tensor.empty"() : () -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%42 = "linalg.generic"(%39, %41) <{indexing_maps = [affine_map<(d0, d1, d2) -> (0, 0, 0)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg3: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg4: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%57 = "math.log"(%arg3) <{fastmath = #arith.fastmath<none>}> : (f64) -> f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%57) : (f64) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<1x1x1xf64>, tensor<1x1x1xf64>) -> tensor<1x1x1xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%43 = "tensor.cast"(%42) : (tensor<1x1x1xf64>) -> tensor<2x3x4xf64> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%44 = "torch.constant.int"() <{value = 6 : i64}> : () -> !torch.int loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%45 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%46 = "arith.constant"() <{value = 0 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%47 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%48 = "arith.constant"() <{value = 1 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%49 = "arith.constant"() <{value = 3 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%50 = "arith.constant"() <{value = 2 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%51 = "arith.constant"() <{value = 4 : index}> : () -> index loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%52 = "tensor.empty"() : () -> tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%53 = "linalg.generic"(%43, %52) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>], operandSegmentSizes = array<i32: 1, 1>}> ({ | |
^bb0(%arg1: f64 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10), %arg2: f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10)): | |
%56 = "arith.truncf"(%arg1) : (f64) -> f32 loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"linalg.yield"(%56) : (f32) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
}) : (tensor<2x3x4xf64>, tensor<2x3x4xf32>) -> tensor<2x3x4xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%54 = "tensor.cast"(%53) : (tensor<2x3x4xf32>) -> tensor<1x1x1xf32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
%55 = "torch_c.from_builtin_tensor"(%54) : (tensor<1x1x1xf32>) -> !torch.vtensor<[1,1,1],f32> loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":4:10) | |
"func.return"(%55) : (!torch.vtensor<[1,1,1],f32>) -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":5:5) | |
}) {torch.onnx_meta.ir_version = 9 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "", torch.onnx_meta.producer_version = ""} : () -> () loc("/home/archana/src/SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/ReduceLogSumExp.default.torch-onnx.mlir":2:3) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At line 300 ConvertTorchOnnxToTorch IR lowering is successful. At 1455 ConvertTorchToLinalg IR lowering is failing with error:
'tensor.cast' op operand type 'tensor<1x1x1xf64>' and result type 'tensor<2x3x4xf64>' are cast incompatible