Skip to content

Instantly share code, notes, and snippets.

@renxida
Created February 8, 2024 23:01
Show Gist options
  • Save renxida/2927572ce08c07a371ce308ce3955cb1 to your computer and use it in GitHub Desktop.
Save renxida/2927572ce08c07a371ce308ce3955cb1 to your computer and use it in GitHub Desktop.
/home/azureuser/torch-mlir/build/bin/torch-mlir-opt: /home/azureuser/miniconda/lib/libtinfo.so.6: no version information available (required by /home/azureuser/torch-mlir/build/bin/torch-mlir-opt)
Args: /home/azureuser/torch-mlir/build/bin/torch-mlir-opt --split-input-file --mlir-print-debuginfo --mlir-elide-elementsattrs-if-larger=16 --mlir-print-stacktrace-on-diagnostic --mlir-disable-threading --mlir-print-ir-after-failure --mlir-print-ir-module-scope -pass-pipeline=builtin.module(torch-backend-to-linalg-on-tensors-backend-pipeline) /tmp/simple_ops_a_to_f.torch.mlir -o /tmp/simple_ops_a_to_f.linalg.mlir -debug
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)
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::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::Type>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneOperand<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::AllowsTypeRefinement<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::HasValueSemantics<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::ReadOnly<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::VariadicOperands<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasParent<mlir::func::FuncOp>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ConditionallySpeculatable::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::AlwaysSpeculatableImplTrait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemoryEffectOpInterface::Trait<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 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 complex
Load new dialect in Context linalg
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::OffsetSizeAndStrideOpInterface)
Load new dialect in Context tensor
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ReifyRankedShapedTypeOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DestinationStyleOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::AggregatedOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::TilingInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::LinalgOp)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::ContractionOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::ConvolutionOpInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::FillOpInterface)
Load new dialect in Context ml_program
Load new dialect in Context scf
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ParallelCombiningOpInterface)
Load new dialect in Context tm_tensor
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::TMTensor::TMTensorOp)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::TMTensor::ScalarLoopOpInterface)
Load new dialect in Context torch_c
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DialectFoldInterface)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::ConstantLike<Empty>)
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%0) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.abs'(0x556c92c098d0) {
%0 = "torch.aten.abs"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::HasRecursiveMemoryEffects<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::PreservedAnalyses::AllAnalysesType)
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.abs'(0x556c92c098d0) {
%0 = "torch.aten.abs"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%0) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.abs'(0x556c92c098d0) {
%0 = "torch.aten.abs"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.abs -> ()' {
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.abs -> ()' {
Trying to match "(anonymous namespace)::ConvertElementwiseOp"
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::detail::ConstantOpGenericAdaptorBase::Properties)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::InferIntRangeInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::InferTypeOpInterface::Trait<Empty>)
** Insert : 'arith.constant'(0x556c92c7d370)
** Insert : 'arith.constant'(0x556c92c885d0)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::IndexType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<2>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ShapedDimOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::VariadicResults<Empty>)
** Insert : 'arith.constant'(0x556c92c88640)
** Insert : 'arith.constant'(0x556c92c8b000)
** Insert : 'arith.constant'(0x556c92c8b070)
** Insert : 'arith.constant'(0x556c92c8b0e0)
** Insert : 'arith.constant'(0x556c92c8b150)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::RankedTensorType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ReifyRankedShapedTypeOpInterface::Trait<Empty>)
** Insert : 'tensor.empty'(0x556c92c8bac0)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::linalg::detail::GenericOpGenericAdaptorBase::Properties)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::math::detail::AbsFOpGenericAdaptorBase::Properties)
** Insert : 'math.absf'(0x556c92c8e350)
** Insert : 'linalg.yield'(0x556c92c77fe0)
** Insert : 'linalg.generic'(0x556c92c8e3e0)
** Insert : 'tensor.cast'(0x556c92c8e4d0)
** Replace : 'torch.aten.abs'(0x556c92c098d0)
"(anonymous namespace)::ConvertElementwiseOp" result 1
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c7d370) {
%1 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c885d0) {
%2 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c88640) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b000) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b070) {
%5 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b0e0) {
%6 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b150) {
%7 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%8 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%12 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%12) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.cast'(0x556c92c8e4d0) {
%10 = "tensor.cast"(%9) : (tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
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 @test_abs(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 13 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = builtin.unrealized_conversion_cast %arg0 : !torch.vtensor<[3,4,5],f32> to tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%c1 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%c0 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%c3 = arith.constant 3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%c1_0 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%c4 = arith.constant 4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%c2 = arith.constant 2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%c5 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%1 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%2 = 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<3x4x5xf32>) outs(%1 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)):
%4 = math.absf %in : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
linalg.yield %4 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%cast = tensor.cast %2 : tensor<3x4x5xf32> to tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%3 = torch.aten.abs %arg0 : !torch.vtensor<[3,4,5],f32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
return %3 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%11) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
** Insert : 'torch_c.to_builtin_tensor'(0x556c92c8e970)
** Insert : 'torch_c.from_builtin_tensor'(0x556c92c90e10)
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c7d370) {
%1 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c885d0) {
%2 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c88640) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b000) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b070) {
%5 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b0e0) {
%6 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b150) {
%7 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%8 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
* Fold {
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::TensorType>::Impl<Empty>)
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%12 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SameOperandsAndResultType<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::ArithFastMathInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::VectorUnrollOpInterface::Trait<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::Elementwise<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::Scalarizable<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::Vectorizable<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::Tensorizable<Empty>)
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%12) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.cast'(0x556c92c8e4d0) {
%10 = "tensor.cast"(%9) : (tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
ImplicitTypeIDRegistry::lookupOrInsert(mlir::CastOpInterface::Trait<Empty>)
** Replace : 'tensor.cast'(0x556c92c8e4d0)
} -> SUCCESS
} -> SUCCESS : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%11 = "torch_c.from_builtin_tensor"(%10) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%11) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
* Fold {
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::ValueTensorType>::Impl<Empty>)
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c7d370) {
%1 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c885d0) {
%2 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c88640) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b000) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b070) {
%5 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b0e0) {
%6 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b150) {
%7 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%8 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%11 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%11) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%10 = "torch_c.from_builtin_tensor"(%9) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%10) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c7d370) {
%1 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c885d0) {
%2 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c88640) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b000) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b070) {
%5 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b0e0) {
%6 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b150) {
%7 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%8 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%11 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%11) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%10 = "torch_c.from_builtin_tensor"(%9) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%10) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
ImplicitTypeIDRegistry::lookupOrInsert(mlir::ml_program::detail::GlobalOpGenericAdaptorBase::Properties)
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c7d370) {
%1 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c885d0) {
%2 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c88640) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b000) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b070) {
%5 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b0e0) {
%6 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b150) {
%7 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%8 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%11 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%11) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%10 = "torch_c.from_builtin_tensor"(%9) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%10) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c7d370) {
%1 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c885d0) {
%2 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c88640) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b000) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b070) {
%5 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b0e0) {
%6 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c8b150) {
%7 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%8 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%11 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%11) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%10 = "torch_c.from_builtin_tensor"(%9) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%10) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
** Replace : 'arith.constant'(0x556c92c8b000)
** Erase : 'arith.constant'(0x556c92c8b000)
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%6 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c7d370) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c7d370)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c885d0) {
%4 = "arith.constant"() <{value = 0 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c885d0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c88640) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c88640)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c8b070) {
%2 = "arith.constant"() <{value = 4 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c8b070)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c8b0e0) {
%1 = "arith.constant"() <{value = 2 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c8b0e0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c8b150) {
%0 = "arith.constant"() <{value = 5 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c8b150)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c8bac0) {
%1 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92c8e3e0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'math.absf'(0x556c92c8e350) {
%4 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%4) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%3 = "torch_c.from_builtin_tensor"(%2) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%3) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c8bac0) {
%1 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92c8e3e0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'math.absf'(0x556c92c8e350) {
%4 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%4) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%3 = "torch_c.from_builtin_tensor"(%2) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%3) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%3) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%3 = "torch_c.from_builtin_tensor"(%2) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%4) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92c8e3e0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'math.absf'(0x556c92c8e350) {
%4 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c8bac0) {
%1 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
ImplicitTypeIDRegistry::lookupOrInsert(mlir::DominanceInfo)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::IsCommutative<Empty>)
//===-------------------------------------------===//
Legalizing operation : 'builtin.module'(0x556c92c20f90) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'ml_program.global'(0x556c92c7a5d0) {
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'func.func -> ()' {
Trying to match "(anonymous namespace)::FunctionOpInterfaceSignatureConversion"
"(anonymous namespace)::FunctionOpInterfaceSignatureConversion" result 1
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: builtin.module
type of return operand 0 ('!torch.vtensor<[3,4,5],f32>') doesn't match function result type ('tensor<3x4x5xf32>') in function @test_abs
mlir-asm-printer: 'builtin.module' failed to verify and will be printed in generic form
"builtin.module"() ({
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
"func.func"() <{function_type = (tensor<3x4x5xf32>) -> tensor<3x4x5xf32>, sym_name = "test_abs"}> ({
^bb0(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)):
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%1 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%2 = "linalg.generic"(%0, %1) <{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: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8), %arg2: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)):
%4 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
"linalg.yield"(%4) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
}) : (tensor<3x4x5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%3 = "torch_c.from_builtin_tensor"(%2) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
"func.return"(%3) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
}) {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 13 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:1)
}) : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":0:0)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%1 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%4 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%4) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%3 = "torch_c.from_builtin_tensor"(%2) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%3) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'func.return -> ()' {
Trying to match "(anonymous namespace)::ReturnOpTypeConversion"
"(anonymous namespace)::ReturnOpTypeConversion" result 1
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%4) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
'torch_c.to_builtin_tensor' op using value defined outside the region
mlir-asm-printer: 'func.func' failed to verify and will be printed in generic form
"func.func"() <{function_type = (tensor<3x4x5xf32>) -> tensor<3x4x5xf32>, sym_name = "test_abs"}> ({
^bb0(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)):
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%1 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%2 = "linalg.generic"(%0, %1) <{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: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8), %arg2: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)):
%5 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
}) : (tensor<3x4x5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%3 = "torch_c.from_builtin_tensor"(%2) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%4 = "builtin.unrealized_conversion_cast"(%3) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
"func.return"(%4) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
}) {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 13 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:1)
} -> SUCCESS
//===-------------------------------------------===//
** Insert : 'torch_c.to_builtin_tensor'(0x556c92c098d0)
** Insert : 'torch_c.from_builtin_tensor'(0x556c92c6f860)
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c6f860) {
%0 = "torch_c.from_builtin_tensor"(%arg0) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%1 = "torch_c.to_builtin_tensor"(%0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c8bac0) {
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92c8e3e0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'math.absf'(0x556c92c8e350) {
%6 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%6) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c098d0) {
%5 = "torch_c.to_builtin_tensor"(%4) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%5) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c6f860) {
%0 = "torch_c.from_builtin_tensor"(%arg0) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.from_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>"
** Replace : 'torch_c.from_builtin_tensor'(0x556c92c6f860)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_abs(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 13 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)
%1 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%2 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%3 = 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(%1 : tensor<3x4x5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)):
%6 = math.absf %in : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
linalg.yield %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%4 = torch_c.from_builtin_tensor %3 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%5 = torch_c.to_builtin_tensor %4 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
return %5 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c8e970) {
%1 = "torch_c.to_builtin_tensor"(%0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.to_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>"
** Replace : 'torch_c.to_builtin_tensor'(0x556c92c8e970)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_abs(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 13 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)
%1 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%2 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%3 = 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(%1 : tensor<3x4x5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)):
%6 = math.absf %in : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
linalg.yield %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%4 = torch_c.from_builtin_tensor %3 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%5 = torch_c.to_builtin_tensor %4 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
return %5 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%6 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%6) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c90e10) {
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.from_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>"
** Replace : 'torch_c.from_builtin_tensor'(0x556c92c90e10)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_abs(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 13 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)
%1 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%2 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%3 = 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(%1 : tensor<3x4x5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)):
%6 = math.absf %in : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
linalg.yield %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%4 = torch_c.from_builtin_tensor %3 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%5 = torch_c.to_builtin_tensor %4 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
return %5 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c098d0) {
%5 = "torch_c.to_builtin_tensor"(%4) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.to_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>"
** Replace : 'torch_c.to_builtin_tensor'(0x556c92c098d0)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_abs(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 13 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:21)
%1 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%2 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%3 = 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(%1 : tensor<3x4x5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)):
%6 = math.absf %in : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
linalg.yield %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%4 = torch_c.from_builtin_tensor %3 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
%5 = torch_c.to_builtin_tensor %4 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
return %5 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":8:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%5) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'builtin.module'(0x556c92c20f90) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'ml_program.global'(0x556c92c7a5d0) {
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c20580) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c8bac0) {
%0 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92c8e3e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'math.absf'(0x556c92c8e350) {
%2 = "math.absf"(%arg1) <{fastmath = #arith.fastmath<none>}> : (f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c77fe0) {
"linalg.yield"(%2) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":10:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c0a300) {
"func.return"(%1) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:1 offset ":11:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
mlir-asm-printer: Verifying operation: builtin.module
ImplicitTypeIDRegistry::lookupOrInsert(mlir::detail::StorageUserTrait::IsMutable<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::MemRefLayoutAttrInterface::Trait<Empty>)
Load new dialect in Context builtin
Load new dialect in Context func
Load new dialect in Context cf
Load new dialect in Context arith
Load new dialect in Context torch
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::torch::Torch::IntType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::OpTrait::AllowedInModuleInitializer<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::NOperands<3>::Impl<Empty>)
Load new dialect in Context affine
Load new dialect in Context ub
Load new dialect in Context complex
Load new dialect in Context linalg
Load new dialect in Context math
Load new dialect in Context memref
Load new dialect in Context tensor
Load new dialect in Context ml_program
Load new dialect in Context scf
Load new dialect in Context tm_tensor
Load new dialect in Context torch_c
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%1) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x556c92c4e660) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],f32>, !torch.vtensor<[3,4,5],f32>, !torch.int) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x556c92c4e490) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92c4e490) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add.Tensor'(0x556c92c4e660) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],f32>, !torch.vtensor<[3,4,5],f32>, !torch.int) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%1) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92c4e490) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* 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.add.Tensor'(0x556c92c4e660) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],f32>, !torch.vtensor<[3,4,5],f32>, !torch.int) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.add.Tensor -> ()' {
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.add.Tensor -> ()' {
Trying to match "(anonymous namespace)::ConvertElementwiseOp"
** Insert : 'arith.constant'(0x556c92c2c6f0)
** Insert : 'arith.constant'(0x556c92c3c9a0)
** Insert : 'arith.constant'(0x556c92c3ca10)
** Insert : 'arith.constant'(0x556c92c3cf00)
** Insert : 'arith.constant'(0x556c92c3cf70)
** Insert : 'arith.constant'(0x556c92c3d460)
** Insert : 'arith.constant'(0x556c92c3d4d0)
** Insert : 'arith.constant'(0x556c92c3de40)
** Insert : 'arith.constant'(0x556c92c3deb0)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::detail::CmpIOpGenericAdaptorBase::Properties)
** Insert : 'arith.cmpi'(0x556c92c6f740)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::cf::detail::AssertOpGenericAdaptorBase::Properties)
** Insert : 'cf.assert'(0x556c92c2d970)
** Insert : 'arith.constant'(0x556c92c3ef30)
** Insert : 'arith.constant'(0x556c92c3efa0)
** Insert : 'arith.cmpi'(0x556c92c8aad0)
** Insert : 'cf.assert'(0x556c92c3f0e0)
** Insert : 'arith.constant'(0x556c92c3d540)
** Insert : 'arith.constant'(0x556c92c3f220)
** Insert : 'arith.cmpi'(0x556c92c3f170)
** Insert : 'cf.assert'(0x556c92c3f280)
** Insert : 'tensor.empty'(0x556c92c3f310)
** Insert : 'arith.sitofp'(0x556c92c412f0)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::detail::MulFOpGenericAdaptorBase::Properties)
** Insert : 'arith.mulf'(0x556c92c41c60)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::detail::AddFOpGenericAdaptorBase::Properties)
** Insert : 'arith.addf'(0x556c92c41d10)
** Insert : 'linalg.yield'(0x556c92c41db0)
** Insert : 'linalg.generic'(0x556c92bb32a0)
** Insert : 'tensor.cast'(0x556c92c41e40)
** Replace : 'torch.aten.add.Tensor'(0x556c92c4e660)
"(anonymous namespace)::ConvertElementwiseOp" result 1
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c2c6f0) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3c9a0) {
%5 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ca10) {
%6 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf00) {
%7 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf70) {
%8 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d460) {
%9 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d4d0) {
%10 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3de40) {
%11 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3deb0) {
%12 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%13 = "arith.cmpi"(%6, %12) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c2d970) {
"cf.assert"(%13) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ef30) {
%14 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3efa0) {
%15 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c8aad0) {
%16 = "arith.cmpi"(%8, %15) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f0e0) {
"cf.assert"(%16) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d540) {
%17 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3f220) {
%18 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c3f170) {
%19 = "arith.cmpi"(%10, %18) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f280) {
"cf.assert"(%19) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%20 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c412f0) {
%24 = "arith.sitofp"(%3) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c41c60) {
%25 = "arith.mulf"(%arg3, %24) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%26 = "arith.addf"(%arg2, %25) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%26) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.cast'(0x556c92c41e40) {
%22 = "tensor.cast"(%21) : (tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = builtin.unrealized_conversion_cast %arg1 : !torch.vtensor<[3,4,5],f32> to tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = builtin.unrealized_conversion_cast %arg0 : !torch.vtensor<[3,4,5],f32> to tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%int1 = torch.constant.int 1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = builtin.unrealized_conversion_cast %int1 : !torch.int to i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c0 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c3 = arith.constant 3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_0 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c4 = arith.constant 4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c2 = arith.constant 2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c5 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c0_1 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c3_2 = arith.constant 3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = arith.cmpi eq, %c3, %c3_2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_3 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c4_4 = arith.constant 4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = arith.cmpi eq, %c4, %c4_4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %4, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c2_5 = arith.constant 2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c5_6 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = arith.cmpi eq, %c5, %c5_6 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %5, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1, %0 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%6 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_7: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%9 = arith.sitofp %2 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%10 = arith.mulf %in_7, %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%11 = arith.addf %in, %10 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %11 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%cast = tensor.cast %7 : tensor<3x4x5xf32> to tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%8 = torch.aten.add.Tensor %arg0, %arg1, %int1 : !torch.vtensor<[3,4,5],f32>, !torch.vtensor<[3,4,5],f32>, !torch.int -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %8 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%23) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
** Insert : 'torch_c.to_i64'(0x556c92c426f0)
** Insert : 'torch_c.to_builtin_tensor'(0x556c92c427a0)
** Insert : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0)
** Insert : 'torch_c.from_builtin_tensor'(0x556c92c9d670)
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92c4e490) {
%2 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c426f0) {
%3 = "torch_c.to_i64"(%2) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c2c6f0) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3c9a0) {
%5 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ca10) {
%6 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf00) {
%7 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf70) {
%8 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d460) {
%9 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d4d0) {
%10 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3de40) {
%11 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3deb0) {
%12 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%13 = "arith.cmpi"(%6, %12) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c2d970) {
"cf.assert"(%13) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SameTypeOperands<Empty>)
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ef30) {
%14 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3efa0) {
%15 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c8aad0) {
%16 = "arith.cmpi"(%8, %15) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f0e0) {
"cf.assert"(%16) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d540) {
%17 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3f220) {
%18 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c3f170) {
%19 = "arith.cmpi"(%10, %18) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f280) {
"cf.assert"(%19) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%20 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c412f0) {
%24 = "arith.sitofp"(%3) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c41c60) {
%25 = "arith.mulf"(%arg3, %24) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%26 = "arith.addf"(%arg2, %25) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%26) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.cast'(0x556c92c41e40) {
%22 = "tensor.cast"(%21) : (tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
** Replace : 'tensor.cast'(0x556c92c41e40)
} -> SUCCESS
} -> SUCCESS : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%23 = "torch_c.from_builtin_tensor"(%22) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%23) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92c4e490) {
%2 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.constant.int -> ()' {
Trying to match "(anonymous namespace)::ConvertTorchConstantIntOp"
** Insert : 'arith.constant'(0x556c92c3ae10)
** Replace : 'torch.constant.int'(0x556c92c4e490)
"(anonymous namespace)::ConvertTorchConstantIntOp" result 1
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ae10) {
%2 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%int1 = torch.constant.int 1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = torch_c.to_i64 %int1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c0 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c3 = arith.constant 3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_0 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c4 = arith.constant 4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c2 = arith.constant 2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c5 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c0_1 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c3_2 = arith.constant 3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = arith.cmpi eq, %c3, %c3_2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_3 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c4_4 = arith.constant 4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = arith.cmpi eq, %c4, %c4_4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %4, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c2_5 = arith.constant 2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c5_6 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = arith.cmpi eq, %c5, %c5_6 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %5, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%6 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_7: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%9 = arith.sitofp %2 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%10 = arith.mulf %in_7, %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%11 = arith.addf %in, %10 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %11 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%8 = torch_c.from_builtin_tensor %7 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %8 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c426f0) {
%4 = "torch_c.to_i64"(%3) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c2c6f0) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3c9a0) {
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ca10) {
%7 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf00) {
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf70) {
%9 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d460) {
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d4d0) {
%11 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3de40) {
%12 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3deb0) {
%13 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%14 = "arith.cmpi"(%7, %13) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c2d970) {
"cf.assert"(%14) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ef30) {
%15 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3efa0) {
%16 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c8aad0) {
%17 = "arith.cmpi"(%9, %16) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f0e0) {
"cf.assert"(%17) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d540) {
%18 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3f220) {
%19 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c3f170) {
%20 = "arith.cmpi"(%11, %19) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f280) {
"cf.assert"(%20) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%21 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c412f0) {
%24 = "arith.sitofp"(%4) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c41c60) {
%25 = "arith.mulf"(%arg3, %24) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%26 = "arith.addf"(%arg2, %25) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%26) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%23 = "torch_c.from_builtin_tensor"(%22) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%23) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
** Insert : 'torch_c.from_i64'(0x556c92c41e40)
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ae10) {
%2 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_i64'(0x556c92c41e40) {
%3 = "torch_c.from_i64"(%2) : (i64) -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c426f0) {
%4 = "torch_c.to_i64"(%3) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c2c6f0) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3c9a0) {
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ca10) {
%7 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf00) {
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf70) {
%9 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d460) {
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d4d0) {
%11 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3de40) {
%12 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3deb0) {
%13 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%14 = "arith.cmpi"(%7, %13) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c2d970) {
"cf.assert"(%14) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ef30) {
%15 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3efa0) {
%16 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c8aad0) {
%17 = "arith.cmpi"(%9, %16) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f0e0) {
"cf.assert"(%17) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d540) {
%18 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3f220) {
%19 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c3f170) {
%20 = "arith.cmpi"(%11, %19) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f280) {
"cf.assert"(%20) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%21 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c412f0) {
%24 = "arith.sitofp"(%4) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c41c60) {
%25 = "arith.mulf"(%arg3, %24) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%26 = "arith.addf"(%arg2, %25) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%26) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%23 = "torch_c.from_builtin_tensor"(%22) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%23) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::OneTypedResult<mlir::IntegerType>::Impl<Empty>)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::OpTrait::SameOperandsAndResultShape<Empty>)
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ae10) {
%2 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_i64'(0x556c92c41e40) {
%3 = "torch_c.from_i64"(%2) : (i64) -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c426f0) {
%4 = "torch_c.to_i64"(%3) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c2c6f0) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3c9a0) {
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ca10) {
%7 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf00) {
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf70) {
%9 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d460) {
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d4d0) {
%11 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3de40) {
%12 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3deb0) {
%13 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%14 = "arith.cmpi"(%7, %13) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c2d970) {
"cf.assert"(%14) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ef30) {
%15 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3efa0) {
%16 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c8aad0) {
%17 = "arith.cmpi"(%9, %16) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f0e0) {
"cf.assert"(%17) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d540) {
%18 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3f220) {
%19 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c3f170) {
%20 = "arith.cmpi"(%11, %19) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f280) {
"cf.assert"(%20) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%21 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c412f0) {
%24 = "arith.sitofp"(%4) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c41c60) {
%25 = "arith.mulf"(%arg3, %24) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%26 = "arith.addf"(%arg2, %25) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%26) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%23 = "torch_c.from_builtin_tensor"(%22) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%23) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ae10) {
%2 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_i64'(0x556c92c41e40) {
%3 = "torch_c.from_i64"(%2) : (i64) -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
ImplicitTypeIDRegistry::lookupOrInsert(mlir::torch::Torch::detail::ConstantIntOpGenericAdaptorBase::Properties)
** Insert : 'torch.constant.int'(0x556c92bd6e90)
** Replace : 'torch_c.from_i64'(0x556c92c41e40)
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92bd6e90) {
%3 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
} -> FAILURE : failed to legalize generated constant 'torch.constant.int'
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c426f0) {
%4 = "torch_c.to_i64"(%3) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c2c6f0) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3c9a0) {
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ca10) {
%7 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf00) {
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3cf70) {
%9 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d460) {
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d4d0) {
%11 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3de40) {
%12 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3deb0) {
%13 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%14 = "arith.cmpi"(%7, %13) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c2d970) {
"cf.assert"(%14) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3ef30) {
%15 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3efa0) {
%16 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c8aad0) {
%17 = "arith.cmpi"(%9, %16) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f0e0) {
"cf.assert"(%17) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3d540) {
%18 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c3f220) {
%19 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c3f170) {
%20 = "arith.cmpi"(%11, %19) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92c3f280) {
"cf.assert"(%20) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%21 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c412f0) {
%24 = "arith.sitofp"(%4) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c41c60) {
%25 = "arith.mulf"(%arg3, %24) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%26 = "arith.addf"(%arg2, %25) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%26) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%23 = "torch_c.from_builtin_tensor"(%22) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%23) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
** Replace : 'arith.constant'(0x556c92c3cf00)
** Erase : 'arith.constant'(0x556c92c3cf00)
** Replace : 'arith.constant'(0x556c92c3de40)
** Erase : 'arith.constant'(0x556c92c3de40)
** Replace : 'arith.constant'(0x556c92c3deb0)
** Modified: 'arith.cmpi'(0x556c92c6f740)
** Erase : 'arith.constant'(0x556c92c3deb0)
** Replace : 'arith.constant'(0x556c92c3ef30)
** Erase : 'arith.constant'(0x556c92c3ef30)
** Replace : 'arith.constant'(0x556c92c3efa0)
** Modified: 'arith.cmpi'(0x556c92c8aad0)
** Erase : 'arith.constant'(0x556c92c3efa0)
** Replace : 'arith.constant'(0x556c92c3d540)
** Erase : 'arith.constant'(0x556c92c3d540)
** Replace : 'arith.constant'(0x556c92c3f220)
** Modified: 'arith.cmpi'(0x556c92c3f170)
** Erase : 'arith.constant'(0x556c92c3f220)
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%7 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%8 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3ae10) {
%6 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc(unknown)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_i64'(0x556c92c41e40) {
%9 = "torch_c.from_i64"(%6) : (i64) -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'torch.constant.int'(0x556c92bd6e90)
** Replace : 'torch_c.from_i64'(0x556c92c41e40)
** Modified: 'torch_c.to_i64'(0x556c92c426f0)
** Erase : 'torch_c.from_i64'(0x556c92c41e40)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c2 = arith.constant 2 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%c0 = arith.constant 0 : index loc(unknown)
%c1 = arith.constant 1 : index loc(unknown)
%c1_i64 = arith.constant 1 : i64 loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%int1 = torch.constant.int 1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = torch_c.to_i64 %int1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = arith.cmpi eq, %c3, %c3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = arith.cmpi eq, %c4, %c4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %4, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = arith.cmpi eq, %c5, %c5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %5, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%6 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%9 = arith.sitofp %2 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%10 = arith.mulf %in_0, %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%11 = arith.addf %in, %10 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %11 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%8 = torch_c.from_builtin_tensor %7 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %8 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3ae10) {
%6 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc(unknown)
** Erase : 'arith.constant'(0x556c92c3ae10)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x556c92bd6e90) {
%8 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_i64'(0x556c92c426f0) {
%9 = "torch_c.to_i64"(%8) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'arith.constant'(0x556c92c3deb0)
** Replace : 'torch_c.to_i64'(0x556c92c426f0)
** Modified: 'arith.sitofp'(0x556c92c412f0)
** Erase : 'torch_c.to_i64'(0x556c92c426f0)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c2 = arith.constant 2 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%c0 = arith.constant 0 : index loc(unknown)
%c1 = arith.constant 1 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%int1 = torch.constant.int 1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = arith.cmpi eq, %c3, %c3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %2, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = arith.cmpi eq, %c4, %c4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = arith.cmpi eq, %c5, %c5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %4, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%5 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%8 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%9 = arith.mulf %in_0, %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%10 = arith.addf %in, %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %10 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = torch_c.from_builtin_tensor %6 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %7 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x556c92bd6e90) {
%8 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
** Erase : 'torch.constant.int'(0x556c92bd6e90)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3deb0) {
%8 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c2c6f0) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c2c6f0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3c9a0) {
%4 = "arith.constant"() <{value = 0 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c3c9a0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3ca10) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc(unknown)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3cf70) {
%2 = "arith.constant"() <{value = 4 : index}> : () -> index loc(unknown)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3d460) {
%1 = "arith.constant"() <{value = 2 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c3d460)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3d4d0) {
%0 = "arith.constant"() <{value = 5 : index}> : () -> index loc(unknown)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.cmpi'(0x556c92c6f740) {
%6 = "arith.cmpi"(%2, %2) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'arith.constant'(0x556c92c2c6f0)
** Replace : 'arith.cmpi'(0x556c92c6f740)
** Modified: 'cf.assert'(0x556c92c2d970)
** Erase : 'arith.cmpi'(0x556c92c6f740)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%true = arith.constant true loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %true, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = arith.cmpi eq, %c4, %c4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %2, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = arith.cmpi eq, %c5, %c5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%7 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%8 = arith.mulf %in_0, %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%9 = arith.addf %in, %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %6 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c2c6f0) {
%6 = "arith.constant"() <{value = true}> : () -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'cf.assert'(0x556c92c2d970) {
"cf.assert"(%6) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Pattern : 'cf.assert -> ()' {
Trying to match ""
** Erase : 'cf.assert'(0x556c92c2d970)
"" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%true = arith.constant true loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = arith.cmpi eq, %c4, %c4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %2, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = arith.cmpi eq, %c5, %c5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%7 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%8 = arith.mulf %in_0, %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%9 = arith.addf %in, %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %6 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c2c6f0) {
%6 = "arith.constant"() <{value = true}> : () -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
** Erase : 'arith.constant'(0x556c92c2c6f0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.cmpi'(0x556c92c8aad0) {
%6 = "arith.cmpi"(%1, %1) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'arith.constant'(0x556c92c2c6f0)
** Replace : 'arith.cmpi'(0x556c92c8aad0)
** Modified: 'cf.assert'(0x556c92c3f0e0)
** Erase : 'arith.cmpi'(0x556c92c8aad0)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%true = arith.constant true loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %true, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = arith.cmpi eq, %c5, %c5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %2, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%3 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%6 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = arith.mulf %in_0, %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%8 = arith.addf %in, %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = torch_c.from_builtin_tensor %4 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %5 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c2c6f0) {
%6 = "arith.constant"() <{value = true}> : () -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'cf.assert'(0x556c92c3f0e0) {
"cf.assert"(%6) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Pattern : 'cf.assert -> ()' {
Trying to match ""
** Erase : 'cf.assert'(0x556c92c3f0e0)
"" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%true = arith.constant true loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = arith.cmpi eq, %c5, %c5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %2, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%3 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%6 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = arith.mulf %in_0, %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%8 = arith.addf %in, %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = torch_c.from_builtin_tensor %4 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %5 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c2c6f0) {
%6 = "arith.constant"() <{value = true}> : () -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
** Erase : 'arith.constant'(0x556c92c2c6f0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.cmpi'(0x556c92c3f170) {
%6 = "arith.cmpi"(%0, %0) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'arith.constant'(0x556c92c2c6f0)
** Replace : 'arith.cmpi'(0x556c92c3f170)
** Modified: 'cf.assert'(0x556c92c3f280)
** Erase : 'arith.cmpi'(0x556c92c3f170)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%true = arith.constant true loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
cf.assert %true, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%5 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = arith.mulf %in_0, %5 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = arith.addf %in, %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = torch_c.from_builtin_tensor %3 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %4 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c2c6f0) {
%6 = "arith.constant"() <{value = true}> : () -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'cf.assert'(0x556c92c3f280) {
"cf.assert"(%6) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Pattern : 'cf.assert -> ()' {
Trying to match ""
** Erase : 'cf.assert'(0x556c92c3f280)
"" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%true = arith.constant true loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%5 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = arith.mulf %in_0, %5 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = arith.addf %in, %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = torch_c.from_builtin_tensor %3 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
return %4 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c2c6f0) {
%6 = "arith.constant"() <{value = true}> : () -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
** Erase : 'arith.constant'(0x556c92c2c6f0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c3f310) {
%6 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.sitofp'(0x556c92c412f0) {
%9 = "arith.sitofp"(%5) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'arith.constant'(0x556c92c3de40)
** Replace : 'arith.sitofp'(0x556c92c412f0)
** Modified: 'arith.mulf'(0x556c92c41c60)
** Erase : 'arith.sitofp'(0x556c92c412f0)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
%3 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%cst = arith.constant 1.000000e+00 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = arith.mulf %in_0, %cst : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = arith.addf %in, %5 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3deb0) {
%5 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
** Erase : 'arith.constant'(0x556c92c3deb0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3de40) {
%8 = "arith.constant"() <{value = 1.000000e+00 : f32}> : () -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.mulf'(0x556c92c41c60) {
%9 = "arith.mulf"(%arg3, %8) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Replace : 'arith.mulf'(0x556c92c41c60)
** Modified: 'arith.addf'(0x556c92c41d10)
** Erase : 'arith.mulf'(0x556c92c41c60)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
%3 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%cst = arith.constant 1.000000e+00 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %5 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c3de40) {
%8 = "arith.constant"() <{value = 1.000000e+00 : f32}> : () -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
** Erase : 'arith.constant'(0x556c92c3de40)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.addf'(0x556c92c41d10) {
%8 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%8) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%7 = "torch_c.from_builtin_tensor"(%6) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%7) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
** Erase : 'arith.constant'(0x556c92c3ca10)
** Erase : 'arith.constant'(0x556c92c3cf70)
** Erase : 'arith.constant'(0x556c92c3d4d0)
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c3f310) {
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.addf'(0x556c92c41d10) {
%5 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%4) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%4) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.addf'(0x556c92c41d10) {
%5 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c3f310) {
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'builtin.module'(0x556c92c01100) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'ml_program.global'(0x556c92bf8180) {
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'func.func -> ()' {
Trying to match "(anonymous namespace)::FunctionOpInterfaceSignatureConversion"
"(anonymous namespace)::FunctionOpInterfaceSignatureConversion" result 1
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: builtin.module
type of return operand 0 ('!torch.vtensor<[3,4,5],f32>') doesn't match function result type ('tensor<3x4x5xf32>') in function @test_add
mlir-asm-printer: 'builtin.module' failed to verify and will be printed in generic form
"builtin.module"() ({
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
"func.func"() <{function_type = (tensor<3x4x5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xf32>, sym_name = "test_add"}> ({
^bb0(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)):
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = "linalg.generic"(%0, %1, %2) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, 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: 2, 1>}> ({
^bb0(%arg2: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %arg3: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %arg4: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%5 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
}) : (tensor<3x4x5xf32>, tensor<3x4x5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
"func.return"(%4) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
}) {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
}) : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":0:0)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%1 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%5 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%4) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'func.return -> ()' {
Trying to match "(anonymous namespace)::ReturnOpTypeConversion"
"(anonymous namespace)::ReturnOpTypeConversion" result 1
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%5) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
'torch_c.to_builtin_tensor' op using value defined outside the region
mlir-asm-printer: 'func.func' failed to verify and will be printed in generic form
"func.func"() <{function_type = (tensor<3x4x5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xf32>, sym_name = "test_add"}> ({
^bb0(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)):
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%1 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = "linalg.generic"(%0, %1, %2) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, 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: 2, 1>}> ({
^bb0(%arg2: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %arg3: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %arg4: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%6 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
"linalg.yield"(%6) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
}) : (tensor<3x4x5xf32>, tensor<3x4x5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = "builtin.unrealized_conversion_cast"(%4) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
"func.return"(%5) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
}) {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
** Insert : 'torch_c.to_builtin_tensor'(0x556c92c426f0)
** Insert : 'torch_c.from_builtin_tensor'(0x556c92c41e40)
** Insert : 'torch_c.from_builtin_tensor'(0x556c92c3b000)
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c3b000) {
%0 = "torch_c.from_builtin_tensor"(%arg1) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c41e40) {
%1 = "torch_c.from_builtin_tensor"(%arg0) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%2 = "torch_c.to_builtin_tensor"(%1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%3 = "torch_c.to_builtin_tensor"(%0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c3f310) {
%4 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.addf'(0x556c92c41d10) {
%8 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%8) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%6 = "torch_c.from_builtin_tensor"(%5) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c426f0) {
%7 = "torch_c.to_builtin_tensor"(%6) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%7) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c3b000) {
%0 = "torch_c.from_builtin_tensor"(%arg1) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.from_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>"
** Replace : 'torch_c.from_builtin_tensor'(0x556c92c3b000)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c41e40) {
%1 = "torch_c.from_builtin_tensor"(%arg0) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.from_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>"
** Replace : 'torch_c.from_builtin_tensor'(0x556c92c41e40)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0) {
%2 = "torch_c.to_builtin_tensor"(%1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.to_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>"
** Replace : 'torch_c.to_builtin_tensor'(0x556c92c9d5e0)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c427a0) {
%3 = "torch_c.to_builtin_tensor"(%0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.to_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>"
** Replace : 'torch_c.to_builtin_tensor'(0x556c92c427a0)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%4 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%8 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%8) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c9d670) {
%6 = "torch_c.from_builtin_tensor"(%5) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.from_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>"
** Replace : 'torch_c.from_builtin_tensor'(0x556c92c9d670)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c426f0) {
%7 = "torch_c.to_builtin_tensor"(%6) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.to_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>"
** Replace : 'torch_c.to_builtin_tensor'(0x556c92c426f0)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21), %arg1: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:57)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:21)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<3x4x5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%7) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'builtin.module'(0x556c92c01100) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'ml_program.global'(0x556c92bf8180) {
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c90e00) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c3f310) {
%0 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c41d10) {
%2 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c41db0) {
"linalg.yield"(%2) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92bd4a90) {
"func.return"(%1) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:14 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
mlir-asm-printer: Verifying operation: builtin.module
Load new dialect in Context builtin
Load new dialect in Context func
Load new dialect in Context cf
Load new dialect in Context arith
Load new dialect in Context torch
Load new dialect in Context affine
Load new dialect in Context ub
Load new dialect in Context complex
Load new dialect in Context linalg
Load new dialect in Context math
Load new dialect in Context memref
Load new dialect in Context tensor
Load new dialect in Context ml_program
Load new dialect in Context scf
Load new dialect in Context tm_tensor
Load new dialect in Context torch_c
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%1) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x556c92c4da50) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],f32>, !torch.vtensor<[5],f32>, !torch.int) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x556c92bbce60) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92bbce60) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add.Tensor'(0x556c92c4da50) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],f32>, !torch.vtensor<[5],f32>, !torch.int) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%1) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92bbce60) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* 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.add.Tensor'(0x556c92c4da50) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],f32>, !torch.vtensor<[5],f32>, !torch.int) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.add.Tensor -> ()' {
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.add.Tensor -> ()' {
Trying to match "(anonymous namespace)::ConvertElementwiseOp"
** Insert : 'arith.constant'(0x556c92c95130)
** Insert : 'arith.constant'(0x556c92c63e40)
** Insert : 'arith.constant'(0x556c92c63eb0)
** Insert : 'arith.constant'(0x556c92c643a0)
** Insert : 'arith.constant'(0x556c92c64410)
** Insert : 'arith.constant'(0x556c92c64900)
** Insert : 'arith.constant'(0x556c92c64970)
** Insert : 'arith.constant'(0x556c92c652e0)
** Insert : 'arith.constant'(0x556c92c65350)
** Insert : 'arith.cmpi'(0x556c92c6f740)
** Insert : 'cf.assert'(0x556c92bf3f10)
** Insert : 'tensor.empty'(0x556c92c66cd0)
** Insert : 'arith.sitofp'(0x556c92c68c60)
** Insert : 'arith.mulf'(0x556c92c08f60)
** Insert : 'arith.addf'(0x556c92c09010)
** Insert : 'linalg.yield'(0x556c92c696a0)
** Insert : 'linalg.generic'(0x556c92bb32a0)
** Insert : 'tensor.cast'(0x556c92c69730)
** Replace : 'torch.aten.add.Tensor'(0x556c92c4da50)
"(anonymous namespace)::ConvertElementwiseOp" result 1
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c95130) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63e40) {
%5 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63eb0) {
%6 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c643a0) {
%7 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64410) {
%8 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64900) {
%9 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64970) {
%10 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c652e0) {
%11 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c65350) {
%12 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%13 = "arith.cmpi"(%10, %12) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92bf3f10) {
"cf.assert"(%13) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%14 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c68c60) {
%18 = "arith.sitofp"(%3) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c08f60) {
%19 = "arith.mulf"(%arg3, %18) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%20 = "arith.addf"(%arg2, %19) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%20) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.cast'(0x556c92c69730) {
%16 = "tensor.cast"(%15) : (tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = builtin.unrealized_conversion_cast %arg1 : !torch.vtensor<[5],f32> to tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%1 = builtin.unrealized_conversion_cast %arg0 : !torch.vtensor<[3,4,5],f32> to tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%int1 = torch.constant.int 1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%2 = builtin.unrealized_conversion_cast %int1 : !torch.int to i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c1 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c0 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c3 = arith.constant 3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c1_0 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c4 = arith.constant 4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c2 = arith.constant 2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c5 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c0_1 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c5_2 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = arith.cmpi eq, %c5, %c5_2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%1, %0 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_3: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%7 = arith.sitofp %2 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%8 = arith.mulf %in_3, %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%9 = arith.addf %in, %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%cast = tensor.cast %5 : tensor<3x4x5xf32> to tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch.aten.add.Tensor %arg0, %arg1, %int1 : !torch.vtensor<[3,4,5],f32>, !torch.vtensor<[5],f32>, !torch.int -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
return %6 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%17) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
** Insert : 'torch_c.to_i64'(0x556c92c69fe0)
** Insert : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0)
** Insert : 'torch_c.to_builtin_tensor'(0x556c92ca1d40)
** Insert : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0)
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92bbce60) {
%2 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c69fe0) {
%3 = "torch_c.to_i64"(%2) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c95130) {
%4 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63e40) {
%5 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63eb0) {
%6 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c643a0) {
%7 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64410) {
%8 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64900) {
%9 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64970) {
%10 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c652e0) {
%11 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c65350) {
%12 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%13 = "arith.cmpi"(%10, %12) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92bf3f10) {
"cf.assert"(%13) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%14 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c68c60) {
%18 = "arith.sitofp"(%3) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c08f60) {
%19 = "arith.mulf"(%arg3, %18) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%20 = "arith.addf"(%arg2, %19) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%20) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.cast'(0x556c92c69730) {
%16 = "tensor.cast"(%15) : (tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
** Replace : 'tensor.cast'(0x556c92c69730)
} -> SUCCESS
} -> SUCCESS : operation was folded
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%17 = "torch_c.from_builtin_tensor"(%16) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%17) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92bbce60) {
%2 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.constant.int -> ()' {
Trying to match "(anonymous namespace)::ConvertTorchConstantIntOp"
** Insert : 'arith.constant'(0x556c92c612a0)
** Replace : 'torch.constant.int'(0x556c92bbce60)
"(anonymous namespace)::ConvertTorchConstantIntOp" result 1
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c612a0) {
%2 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%int1 = torch.constant.int 1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%2 = torch_c.to_i64 %int1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c1 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c0 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c3 = arith.constant 3 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c1_0 = arith.constant 1 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c4 = arith.constant 4 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c2 = arith.constant 2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c5 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c0_1 = arith.constant 0 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c5_2 = arith.constant 5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = arith.cmpi eq, %c5, %c5_2 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_3: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%7 = arith.sitofp %2 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%8 = arith.mulf %in_3, %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%9 = arith.addf %in, %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
return %6 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c69fe0) {
%4 = "torch_c.to_i64"(%3) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c95130) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63e40) {
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63eb0) {
%7 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c643a0) {
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64410) {
%9 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64900) {
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64970) {
%11 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c652e0) {
%12 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c65350) {
%13 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%14 = "arith.cmpi"(%11, %13) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92bf3f10) {
"cf.assert"(%14) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%15 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c68c60) {
%18 = "arith.sitofp"(%4) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c08f60) {
%19 = "arith.mulf"(%arg3, %18) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%20 = "arith.addf"(%arg2, %19) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%20) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%17 = "torch_c.from_builtin_tensor"(%16) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%17) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
** Insert : 'torch_c.from_i64'(0x556c92c69730)
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c612a0) {
%2 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_i64'(0x556c92c69730) {
%3 = "torch_c.from_i64"(%2) : (i64) -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c69fe0) {
%4 = "torch_c.to_i64"(%3) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c95130) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63e40) {
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63eb0) {
%7 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c643a0) {
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64410) {
%9 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64900) {
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64970) {
%11 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c652e0) {
%12 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c65350) {
%13 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%14 = "arith.cmpi"(%11, %13) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92bf3f10) {
"cf.assert"(%14) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%15 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c68c60) {
%18 = "arith.sitofp"(%4) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c08f60) {
%19 = "arith.mulf"(%arg3, %18) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%20 = "arith.addf"(%arg2, %19) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%20) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%17 = "torch_c.from_builtin_tensor"(%16) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%17) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c612a0) {
%2 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_i64'(0x556c92c69730) {
%3 = "torch_c.from_i64"(%2) : (i64) -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c69fe0) {
%4 = "torch_c.to_i64"(%3) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c95130) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63e40) {
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63eb0) {
%7 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c643a0) {
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64410) {
%9 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64900) {
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64970) {
%11 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c652e0) {
%12 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c65350) {
%13 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%14 = "arith.cmpi"(%11, %13) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92bf3f10) {
"cf.assert"(%14) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%15 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c68c60) {
%18 = "arith.sitofp"(%4) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c08f60) {
%19 = "arith.mulf"(%arg3, %18) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%20 = "arith.addf"(%arg2, %19) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%20) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%17 = "torch_c.from_builtin_tensor"(%16) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%17) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c612a0) {
%2 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_i64'(0x556c92c69730) {
%3 = "torch_c.from_i64"(%2) : (i64) -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
** Insert : 'torch.constant.int'(0x556c92c7e990)
** Replace : 'torch_c.from_i64'(0x556c92c69730)
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92c7e990) {
%3 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
} -> FAILURE : failed to legalize generated constant 'torch.constant.int'
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_i64'(0x556c92c69fe0) {
%4 = "torch_c.to_i64"(%3) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c95130) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63e40) {
%6 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c63eb0) {
%7 = "arith.constant"() <{value = 3 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c643a0) {
%8 = "arith.constant"() <{value = 1 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64410) {
%9 = "arith.constant"() <{value = 4 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64900) {
%10 = "arith.constant"() <{value = 2 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c64970) {
%11 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c652e0) {
%12 = "arith.constant"() <{value = 0 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.constant'(0x556c92c65350) {
%13 = "arith.constant"() <{value = 5 : index}> : () -> index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.cmpi'(0x556c92c6f740) {
%14 = "arith.cmpi"(%11, %13) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'cf.assert'(0x556c92bf3f10) {
"cf.assert"(%14) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%15 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.sitofp'(0x556c92c68c60) {
%18 = "arith.sitofp"(%4) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.mulf'(0x556c92c08f60) {
%19 = "arith.mulf"(%arg3, %18) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%20 = "arith.addf"(%arg2, %19) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%20) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%17 = "torch_c.from_builtin_tensor"(%16) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%17) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
} -> FAILURE : no matched legalization pattern
//===-------------------------------------------===//
** Replace : 'arith.constant'(0x556c92c643a0)
** Erase : 'arith.constant'(0x556c92c643a0)
** Replace : 'arith.constant'(0x556c92c652e0)
** Erase : 'arith.constant'(0x556c92c652e0)
** Replace : 'arith.constant'(0x556c92c65350)
** Modified: 'arith.cmpi'(0x556c92c6f740)
** Erase : 'arith.constant'(0x556c92c65350)
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%7 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%8 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c612a0) {
%6 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc(unknown)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_i64'(0x556c92c69730) {
%9 = "torch_c.from_i64"(%6) : (i64) -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'torch.constant.int'(0x556c92c7e990)
** Replace : 'torch_c.from_i64'(0x556c92c69730)
** Modified: 'torch_c.to_i64'(0x556c92c69fe0)
** Erase : 'torch_c.from_i64'(0x556c92c69730)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c2 = arith.constant 2 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%c0 = arith.constant 0 : index loc(unknown)
%c1 = arith.constant 1 : index loc(unknown)
%c1_i64 = arith.constant 1 : i64 loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%int1 = torch.constant.int 1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%2 = torch_c.to_i64 %int1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = arith.cmpi eq, %c5, %c5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
cf.assert %3, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%7 = arith.sitofp %2 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%8 = arith.mulf %in_0, %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%9 = arith.addf %in, %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %9 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
return %6 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c612a0) {
%6 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc(unknown)
** Erase : 'arith.constant'(0x556c92c612a0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x556c92c7e990) {
%8 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_i64'(0x556c92c69fe0) {
%9 = "torch_c.to_i64"(%8) : (!torch.int) -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'arith.constant'(0x556c92c612a0)
** Replace : 'torch_c.to_i64'(0x556c92c69fe0)
** Modified: 'arith.sitofp'(0x556c92c68c60)
** Erase : 'torch_c.to_i64'(0x556c92c69fe0)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%c2 = arith.constant 2 : index loc(unknown)
%c4 = arith.constant 4 : index loc(unknown)
%c3 = arith.constant 3 : index loc(unknown)
%c0 = arith.constant 0 : index loc(unknown)
%c1 = arith.constant 1 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%int1 = torch.constant.int 1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%2 = arith.cmpi eq, %c5, %c5 : index loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
cf.assert %2, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%3 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%6 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = arith.mulf %in_0, %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%8 = arith.addf %in, %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = torch_c.from_builtin_tensor %4 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
return %5 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x556c92c7e990) {
%8 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
** Erase : 'torch.constant.int'(0x556c92c7e990)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c612a0) {
%8 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c95130) {
%5 = "arith.constant"() <{value = 1 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c95130)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c63e40) {
%4 = "arith.constant"() <{value = 0 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c63e40)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c63eb0) {
%3 = "arith.constant"() <{value = 3 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c63eb0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c64410) {
%2 = "arith.constant"() <{value = 4 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c64410)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c64900) {
%1 = "arith.constant"() <{value = 2 : index}> : () -> index loc(unknown)
** Erase : 'arith.constant'(0x556c92c64900)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c64970) {
%0 = "arith.constant"() <{value = 5 : index}> : () -> index loc(unknown)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.cmpi'(0x556c92c6f740) {
%4 = "arith.cmpi"(%0, %0) <{predicate = 0 : i64}> : (index, index) -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'arith.constant'(0x556c92c95130)
** Replace : 'arith.cmpi'(0x556c92c6f740)
** Modified: 'cf.assert'(0x556c92bf3f10)
** Erase : 'arith.cmpi'(0x556c92c6f740)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%true = arith.constant true loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
cf.assert %true, "mismatched size for broadcast" loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%2 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%5 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = arith.mulf %in_0, %5 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = arith.addf %in, %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = torch_c.from_builtin_tensor %3 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
return %4 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c95130) {
%4 = "arith.constant"() <{value = true}> : () -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'cf.assert'(0x556c92bf3f10) {
"cf.assert"(%4) <{msg = "mismatched size for broadcast"}> : (i1) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Pattern : 'cf.assert -> ()' {
Trying to match ""
** Erase : 'cf.assert'(0x556c92bf3f10)
"" result 1
} -> success : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> !torch.vtensor<[3,4,5],f32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%c5 = arith.constant 5 : index loc(unknown)
%0 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%1 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%c1_i64 = arith.constant 1 : i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%true = arith.constant true loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%2 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%5 = arith.sitofp %c1_i64 : i64 to f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = arith.mulf %in_0, %5 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = arith.addf %in, %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %7 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = torch_c.from_builtin_tensor %3 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
return %4 : !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> success : pattern matched
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c95130) {
%4 = "arith.constant"() <{value = true}> : () -> i1 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
** Erase : 'arith.constant'(0x556c92c95130)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c66cd0) {
%4 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.sitofp'(0x556c92c68c60) {
%7 = "arith.sitofp"(%3) : (i64) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Insert : 'arith.constant'(0x556c92c65350)
** Replace : 'arith.sitofp'(0x556c92c68c60)
** Modified: 'arith.mulf'(0x556c92c08f60)
** Erase : 'arith.sitofp'(0x556c92c68c60)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
%3 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%cst = arith.constant 1.000000e+00 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = arith.mulf %in_0, %cst : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = arith.addf %in, %5 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %6 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c612a0) {
%3 = "arith.constant"() <{value = 1 : i64}> : () -> i64 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
** Erase : 'arith.constant'(0x556c92c612a0)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c65350) {
%6 = "arith.constant"() <{value = 1.000000e+00 : f32}> : () -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.mulf'(0x556c92c08f60) {
%7 = "arith.mulf"(%arg3, %6) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> success : operation was folded
//===-------------------------------------------===//
** Replace : 'arith.mulf'(0x556c92c08f60)
** Modified: 'arith.addf'(0x556c92c09010)
** Erase : 'arith.mulf'(0x556c92c08f60)
// *** IR Dump After Successful Folding ***
mlir-asm-printer: Verifying operation: func.func
%3 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%2 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%cst = arith.constant 1.000000e+00 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %5 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
//===-------------------------------------------===//
Processing operation : 'arith.constant'(0x556c92c65350) {
%6 = "arith.constant"() <{value = 1.000000e+00 : f32}> : () -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
** Erase : 'arith.constant'(0x556c92c65350)
} -> success : operation is trivially dead
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.addf'(0x556c92c09010) {
%6 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%6) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%5 = "torch_c.from_builtin_tensor"(%4) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%5) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
** Erase : 'arith.constant'(0x556c92c64970)
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c66cd0) {
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.addf'(0x556c92c09010) {
%5 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%4) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%4) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.addf'(0x556c92c09010) {
%5 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c66cd0) {
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%1 = "torch_c.to_builtin_tensor"(%arg1) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%0 = "torch_c.to_builtin_tensor"(%arg0) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'builtin.module'(0x556c92c89060) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'ml_program.global'(0x556c92c93080) {
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'func.func -> ()' {
Trying to match "(anonymous namespace)::FunctionOpInterfaceSignatureConversion"
"(anonymous namespace)::FunctionOpInterfaceSignatureConversion" result 1
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: builtin.module
type of return operand 0 ('!torch.vtensor<[3,4,5],f32>') doesn't match function result type ('tensor<3x4x5xf32>') in function @test_add_bcast
mlir-asm-printer: 'builtin.module' failed to verify and will be printed in generic form
"builtin.module"() ({
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
"func.func"() <{function_type = (tensor<3x4x5xf32>, tensor<5xf32>) -> tensor<3x4x5xf32>, sym_name = "test_add_bcast"}> ({
^bb0(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)):
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%1 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = "linalg.generic"(%0, %1, %2) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (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: 2, 1>}> ({
^bb0(%arg2: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %arg3: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %arg4: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%5 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
}) : (tensor<3x4x5xf32>, tensor<5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
"func.return"(%4) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
}) {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
}) : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":0:0)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%1 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%5 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%5) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%4) : (!torch.vtensor<[3,4,5],f32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'func.return -> ()' {
Trying to match "(anonymous namespace)::ReturnOpTypeConversion"
"(anonymous namespace)::ReturnOpTypeConversion" result 1
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%5) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
'torch_c.to_builtin_tensor' op using value defined outside the region
mlir-asm-printer: 'func.func' failed to verify and will be printed in generic form
"func.func"() <{function_type = (tensor<3x4x5xf32>, tensor<5xf32>) -> tensor<3x4x5xf32>, sym_name = "test_add_bcast"}> ({
^bb0(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)):
%0 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%1 = "torch_c.to_builtin_tensor"(<<UNKNOWN SSA VALUE>>) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%2 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = "linalg.generic"(%0, %1, %2) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (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: 2, 1>}> ({
^bb0(%arg2: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %arg3: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %arg4: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%6 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
"linalg.yield"(%6) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
}) : (tensor<3x4x5xf32>, tensor<5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = "torch_c.from_builtin_tensor"(%3) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = "builtin.unrealized_conversion_cast"(%4) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
"func.return"(%5) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
}) {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} : () -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
** Insert : 'torch_c.to_builtin_tensor'(0x556c92c69fe0)
** Insert : 'torch_c.from_builtin_tensor'(0x556c92c69730)
** Insert : 'torch_c.from_builtin_tensor'(0x556c92c95030)
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c95030) {
%0 = "torch_c.from_builtin_tensor"(%arg1) : (tensor<5xf32>) -> !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92c69730) {
%1 = "torch_c.from_builtin_tensor"(%arg0) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%2 = "torch_c.to_builtin_tensor"(%1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%3 = "torch_c.to_builtin_tensor"(%0) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'tensor.empty'(0x556c92c66cd0) {
%4 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Pattern (anonymous namespace)::ReplaceEmptyTensorStaticShapeDims : 'tensor.empty -> ()' {
Trying to match "(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims"
"(anonymous namespace)::ReplaceEmptyTensorStaticShapeDims" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.generic'(0x556c92bb32a0) {
* Pattern FoldTensorCastProducerOp : 'linalg.generic -> ()' {
Trying to match "FoldTensorCastProducerOp"
"FoldTensorCastProducerOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseDeadLinalgOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseDeadLinalgOp"
"(anonymous namespace)::EraseDeadLinalgOp" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::InferStaticShapeOfOperands : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::InferStaticShapeOfOperands"
"(anonymous namespace)::InferStaticShapeOfOperands" result 0
} -> failure : pattern failed to match
* Pattern (anonymous namespace)::EraseIdentityGenericOp : 'linalg.generic -> ()' {
Trying to match "(anonymous namespace)::EraseIdentityGenericOp"
"(anonymous namespace)::EraseIdentityGenericOp" result 0
} -> failure : pattern failed to match
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'arith.addf'(0x556c92c09010) {
%8 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%8) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%6 = "torch_c.from_builtin_tensor"(%5) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch_c.to_builtin_tensor'(0x556c92c69fe0) {
%7 = "torch_c.to_builtin_tensor"(%6) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%7) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c95030) {
%0 = "torch_c.from_builtin_tensor"(%arg1) : (tensor<5xf32>) -> !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.from_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>"
** Replace : 'torch_c.from_builtin_tensor'(0x556c92c95030)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<5xf32> -> !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92c69730) {
%1 = "torch_c.from_builtin_tensor"(%arg0) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.from_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>"
** Replace : 'torch_c.from_builtin_tensor'(0x556c92c69730)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<5xf32> -> !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1d40) {
%2 = "torch_c.to_builtin_tensor"(%1) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.to_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>"
** Replace : 'torch_c.to_builtin_tensor'(0x556c92ca1d40)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<5xf32> -> !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0) {
%3 = "torch_c.to_builtin_tensor"(%0) : (!torch.vtensor<[5],f32>) -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.to_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>"
** Replace : 'torch_c.to_builtin_tensor'(0x556c92ca1cb0)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<5xf32> -> !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%4 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%8 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%8) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0) {
%6 = "torch_c.from_builtin_tensor"(%5) : (tensor<3x4x5xf32>) -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.from_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>"
** Replace : 'torch_c.from_builtin_tensor'(0x556c92ca1dd0)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::FromBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<5xf32> -> !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch_c.to_builtin_tensor'(0x556c92c69fe0) {
%7 = "torch_c.to_builtin_tensor"(%6) : (!torch.vtensor<[3,4,5],f32>) -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch_c.to_builtin_tensor -> ()' {
Trying to match "(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>"
** Replace : 'torch_c.to_builtin_tensor'(0x556c92c69fe0)
"(anonymous namespace)::FinalizeMaterialization<mlir::torch::TorchConversion::ToBuiltinTensorOp>" result 1
} -> SUCCESS : pattern applied successfully
// *** IR Dump After Pattern Application ***
mlir-asm-printer: Verifying operation: func.func
func.func @test_add_bcast(%arg0: tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27), %arg1: tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)) -> tensor<3x4x5xf32> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%0 = torch_c.from_builtin_tensor %arg1 : tensor<5xf32> -> !torch.vtensor<[5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:63)
%1 = torch_c.from_builtin_tensor %arg0 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:27)
%2 = torch_c.to_builtin_tensor %1 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%3 = torch_c.to_builtin_tensor %0 : !torch.vtensor<[5],f32> -> tensor<5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%4 = tensor.empty() : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%5 = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>], iterator_types = ["parallel", "parallel", "parallel"]} ins(%2, %3 : tensor<3x4x5xf32>, tensor<5xf32>) outs(%4 : tensor<3x4x5xf32>) {
^bb0(%in: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %in_0: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8), %out: f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)):
%8 = arith.addf %in, %in_0 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
linalg.yield %8 : f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%6 = torch_c.from_builtin_tensor %5 : tensor<3x4x5xf32> -> !torch.vtensor<[3,4,5],f32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
%7 = torch_c.to_builtin_tensor %6 : !torch.vtensor<[3,4,5],f32> -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
return %7 : tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":4:1)
} -> SUCCESS
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%7) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'builtin.module'(0x556c92c89060) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'ml_program.global'(0x556c92c93080) {
"ml_program.global"() <{is_mutable, sym_name = "global_seed", sym_visibility = "private", type = tensor<i64>, value = dense<0> : tensor<i64>}> : () -> () loc(unknown)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92c426e0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'tensor.empty'(0x556c92c66cd0) {
%0 = "tensor.empty"() : () -> tensor<3x4x5xf32> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.generic'(0x556c92bb32a0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'arith.addf'(0x556c92c09010) {
%2 = "arith.addf"(%arg2, %arg3) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32 loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'linalg.yield'(0x556c92c696a0) {
"linalg.yield"(%2) : (f32) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c340c0) {
"func.return"(%1) : (tensor<3x4x5xf32>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:24 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
mlir-asm-printer: Verifying operation: builtin.module
Load new dialect in Context builtin
Load new dialect in Context func
Load new dialect in Context cf
Load new dialect in Context arith
Load new dialect in Context torch
Load new dialect in Context affine
Load new dialect in Context ub
Load new dialect in Context complex
Load new dialect in Context linalg
Load new dialect in Context math
Load new dialect in Context memref
Load new dialect in Context tensor
Load new dialect in Context ml_program
Load new dialect in Context scf
Load new dialect in Context tm_tensor
Load new dialect in Context torch_c
//===-------------------------------------------===//
Processing operation : 'func.return'(0x556c92c808c0) {
"func.return"(%1) : (!torch.vtensor<[3,4,5],ui8>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset ":8:3)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.aten.add.Tensor'(0x556c92bc8bf0) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],ui8>, !torch.vtensor<[3,4,5],ui8>, !torch.int) -> !torch.vtensor<[3,4,5],ui8> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Processing operation : 'torch.constant.int'(0x556c92c90c70) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset ":7:8)
} -> failure : pattern failed to match
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92ca1dc0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92c90c70) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.aten.add.Tensor'(0x556c92bc8bf0) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],ui8>, !torch.vtensor<[3,4,5],ui8>, !torch.int) -> !torch.vtensor<[3,4,5],ui8> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset ":7:8)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.return'(0x556c92c808c0) {
"func.return"(%1) : (!torch.vtensor<[3,4,5],ui8>) -> () loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset ":8:3)
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'func.func'(0x556c92ca1dc0) {
} -> SUCCESS : operation marked legal by the target
//===-------------------------------------------===//
//===-------------------------------------------===//
Legalizing operation : 'torch.constant.int'(0x556c92c90c70) {
%0 = "torch.constant.int"() <{value = 1 : i64}> : () -> !torch.int loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset ":7:8)
* 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.add.Tensor'(0x556c92bc8bf0) {
%1 = "torch.aten.add.Tensor"(%arg0, %arg1, %0) : (!torch.vtensor<[3,4,5],ui8>, !torch.vtensor<[3,4,5],ui8>, !torch.int) -> !torch.vtensor<[3,4,5],ui8> loc("within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset ":7:8)
* Fold {
} -> FAILURE : unable to fold
* Pattern : 'torch.aten.add.Tensor -> ()' {
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.add.Tensor -> ()' {
Trying to match "(anonymous namespace)::ConvertElementwiseOp"
** Insert : 'arith.constant'(0x556c92bf5e10)
** Insert : 'arith.constant'(0x556c92bfb220)
** Insert : 'arith.constant'(0x556c92bfb290)
** Insert : 'arith.constant'(0x556c92bfb370)
** Insert : 'arith.constant'(0x556c92c13c10)
** Insert : 'arith.constant'(0x556c92c13c80)
** Insert : 'arith.constant'(0x556c92c13cf0)
** Insert : 'arith.constant'(0x556c92be67f0)
** Insert : 'arith.constant'(0x556c92be6860)
** Insert : 'arith.cmpi'(0x556c92c41c60)
** Insert : 'cf.assert'(0x556c92c56f10)
** Insert : 'arith.constant'(0x556c92be78e0)
** Insert : 'arith.constant'(0x556c92be7950)
** Insert : 'arith.cmpi'(0x556c92c3f170)
** Insert : 'cf.assert'(0x556c92be7a90)
** Insert : 'arith.constant'(0x556c92be5ef0)
** Insert : 'arith.constant'(0x556c92be7b20)
** Insert : 'arith.cmpi'(0x556c92c8aad0)
** Insert : 'cf.assert'(0x556c92be7b80)
** Insert : 'tensor.empty'(0x556c92be7c10)
within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset :7:8: error: unimplemented: for conversion to byte or char type dstOriginalDtype has to be passed to convertScalarToDtype
within split at /home/azureuser/torch-mlir/test/Conversion/TorchOnnxToTorch/simple_ops_a_to_f.mlir:34 offset :7:8: note: diagnostic emitted with trace:
#0 0x0000556c8f2e659d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/azureuser/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:11
#1 0x0000556c8f0be6ce emitDiag(mlir::Location, mlir::DiagnosticSeverity, llvm::Twine const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/Diagnostics.cpp:319:5
#2 0x0000556c8f0be5f5 mlir::emitError(mlir::Location, llvm::Twine const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/Diagnostics.cpp:330:10
#3 0x0000556c8f0be5ad mlir::emitError(mlir::Location) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/Diagnostics.cpp:328:59
#4 0x0000556c8c8f7210 mlir::torch::Torch::convertScalarToDtype(mlir::OpBuilder&, mlir::Location, mlir::Value, mlir::Type, std::optional<mlir::Type>, std::optional<mlir::Type>) /home/azureuser/torch-mlir/lib/Conversion/Utils/Utils.cpp:269:11
#5 0x0000556c8c3f127c createLinalgPayloadCalculationForElementwiseOp(mlir::OpBuilder&, mlir::Location, mlir::TypeConverter const*, mlir::ValueRange, mlir::Operation*, llvm::ArrayRef<mlir::Value>) /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/Uncategorized.cpp:575:19
#6 0x0000556c8c3ed7f9 (anonymous namespace)::ConvertElementwiseOp::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const::'lambda'(mlir::OpBuilder&, mlir::Location, mlir::ValueRange)::operator()(mlir::OpBuilder&, mlir::Location, mlir::ValueRange) const /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/Uncategorized.cpp:1517:26
#7 0x0000556c8c3ed74d void llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>::callback_fn<(anonymous namespace)::ConvertElementwiseOp::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const::'lambda'(mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>(long, mlir::OpBuilder&, mlir::Location, mlir::ValueRange) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#8 0x0000556c8ca6e1c1 llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>::operator()(mlir::OpBuilder&, mlir::Location, mlir::ValueRange) const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#9 0x0000556c8ca92eee buildGenericRegion(mlir::OpBuilder&, mlir::Location, mlir::Region&, mlir::ValueRange, mlir::ValueRange, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:852:1
#10 0x0000556c8ca929ce mlir::linalg::GenericOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::TypeRange, mlir::ValueRange, mlir::ValueRange, mlir::ArrayAttr, mlir::ArrayAttr, mlir::StringAttr, mlir::StringAttr, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>, llvm::ArrayRef<mlir::NamedAttribute>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:874:1
#11 0x0000556c8ca9324c mlir::linalg::GenericOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::TypeRange, mlir::ValueRange, mlir::ValueRange, llvm::ArrayRef<mlir::AffineMap>, llvm::ArrayRef<mlir::utils::IteratorType>, llvm::StringRef, llvm::StringRef, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>, llvm::ArrayRef<mlir::NamedAttribute>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:883:3
#12 0x0000556c8ca939d0 mlir::linalg::GenericOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::TypeRange, mlir::ValueRange, mlir::ValueRange, llvm::ArrayRef<mlir::AffineMap>, llvm::ArrayRef<mlir::utils::IteratorType>, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>, llvm::ArrayRef<mlir::NamedAttribute>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:927:1
#13 0x0000556c8c43bcc4 mlir::linalg::GenericOp mlir::OpBuilder::create<mlir::linalg::GenericOp, mlir::Type, mlir::ValueRange&, mlir::Value&, llvm::SmallVector<mlir::AffineMap, 6u>&, llvm::SmallVector<mlir::utils::IteratorType, 12u>&, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>&>(mlir::Location, mlir::Type&&, mlir::ValueRange&, mlir::Value&, llvm::SmallVector<mlir::AffineMap, 6u>&, llvm::SmallVector<mlir::utils::IteratorType, 12u>&, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>&) /home/azureuser/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/IR/Builders.h:508:5
#14 0x0000556c8c4376fe mlir::torch::torch_to_linalg::createElementwiseLinalgGeneric(mlir::OpBuilder&, mlir::Location, mlir::ValueRange, mlir::Type, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>) /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/Utils.cpp:316:8
#15 0x0000556c8c3eca83 (anonymous namespace)::ConvertElementwiseOp::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/Uncategorized.cpp:1514:21
#16 0x0000556c8dbc4c08 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1676:10
#17 0x0000556c8dc4f7de mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>)::$_0::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:208:31
#18 0x0000556c8dc4f635 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>)::$_0>(long) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#19 0x0000556c8b6ba929 llvm::function_ref<void ()>::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#20 0x0000556c8dc51045 void mlir::MLIRContext::executeAction<mlir::ApplyPatternAction, mlir::Pattern const&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pattern const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:276:3
#21 0x0000556c8dc4e0d7 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:229:9
#22 0x0000556c8dbcf360 (anonymous namespace)::OperationLegalizer::legalizeWithPattern(mlir::Operation*, mlir::ConversionPatternRewriter&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1958:21
#23 0x0000556c8dbcea79 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1866:17
#24 0x0000556c8dbcde9f (anonymous namespace)::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2377:26
#25 0x0000556c8dbc6f0e (anonymous namespace)::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>, llvm::function_ref<void (mlir::Diagnostic&)>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2431:16
#26 0x0000556c8dbc6cd7 mlir::applyPartialConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, llvm::DenseSet<mlir::Operation*, llvm::DenseMapInfo<mlir::Operation*, void>>*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3401:22
#27 0x0000556c8dbc713e mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, llvm::DenseSet<mlir::Operation*, llvm::DenseMapInfo<mlir::Operation*, void>>*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3407:10
#28 0x0000556c8c3eade2 (anonymous namespace)::ConvertTorchToLinalg::runOnOperation() /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/TorchToLinalg.cpp:87:16
#29 0x0000556c8dd05ffb mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:0:17
#30 0x0000556c8dd05f95 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#31 0x0000556c8b6ba929 llvm::function_ref<void ()>::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#32 0x0000556c8dd08d35 void mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:276:3
#33 0x0000556c8dd01753 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:525:17
#34 0x0000556c8dd01cd4 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:585:16
#35 0x0000556c8dd02b2e mlir::detail::OpToOpPassAdaptor::runOnOperationImpl(bool) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:726:20
#36 0x0000556c8dd023dd mlir::detail::OpToOpPassAdaptor::runOnOperation(bool) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:709:1
#37 0x0000556c8dd05fe6 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:517:11
#38 0x0000556c8dd05f95 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#39 0x0000556c8b6ba929 llvm::function_ref<void ()>::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#40 0x0000556c8dd08d35 void mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:276:3
#41 0x0000556c8dd01753 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:525:17
#42 0x0000556c8dd01cd4 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:585:16
#43 0x0000556c8dd03718 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:896:10
#44 0x0000556c8dd03642 mlir::PassManager::run(mlir::Operation*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:876:60
#45 0x0000556c8b63ec32 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:394:17
#46 0x0000556c8b63e868 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPool*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:459:12
#47 0x0000556c8b63e64c mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:530:12
#48 0x0000556c8b63e5e6 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#49 0x0000556c8f1d2c52 llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
#50 0x0000556c8f1d2b78 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0::operator()(llvm::StringRef) const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Support/ToolUtilities.cpp:88:16
#51 0x0000556c8f1d29ae void llvm::interleave<llvm::StringRef const*, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, void llvm::interleave<llvm::SmallVector<llvm::StringRef, 8u>, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::raw_ostream, llvm::StringRef>(llvm::SmallVector<llvm::StringRef, 8u> const&, llvm::raw_ostream&, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::StringRef const&)::'lambda'(), void>(llvm::SmallVector<llvm::StringRef, 8u>, llvm::SmallVector<llvm::StringRef, 8u>, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::raw_ostream) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLExtras.h:2107:24
#52 0x0000556c8f1d28fa void llvm::interleave<llvm::SmallVector<llvm::StringRef, 8u>, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::raw_ostream, llvm::StringRef>(llvm::SmallVector<llvm::StringRef, 8u> const&, llvm::raw_ostream&, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::StringRef const&) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLExtras.h:2128:1
#53 0x0000556c8f1d2823 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Support/ToolUtilities.cpp:95:18
#54 0x0000556c8b63b51b mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:533:10
#55 0x0000556c8b63b7b5 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:568:14
#56 0x0000556c8b63b988 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:584:10
#57 0x0000556c8b636ea5 main /home/azureuser/torch-mlir/tools/torch-mlir-opt/torch-mlir-opt.cpp:43:33
#58 0x00007f1a0f823a90 (/lib/x86_64-linux-gnu/libc.so.6+0x23a90)
#59 0x00007f1a0f823b49 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23b49)
#60 0x0000556c8b636d35 _start (/home/azureuser/torch-mlir/build/bin/torch-mlir-opt+0x213d35)
ImplicitTypeIDRegistry::lookupOrInsert(mlir::arith::detail::MulIOpGenericAdaptorBase::Properties)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/azureuser/torch-mlir/build/bin/torch-mlir-opt --split-input-file --mlir-print-debuginfo --mlir-elide-elementsattrs-if-larger=16 --mlir-print-stacktrace-on-diagnostic --mlir-disable-threading --mlir-print-ir-after-failure --mlir-print-ir-module-scope -pass-pipeline=builtin.module(torch-backend-to-linalg-on-tensors-backend-pipeline) /tmp/simple_ops_a_to_f.torch.mlir -o /tmp/simple_ops_a_to_f.linalg.mlir -debug
#0 0x0000556c8f2e659d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/azureuser/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:11
#1 0x0000556c8f2e6a8b PrintStackTraceSignalHandler(void*) /home/azureuser/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:1
#2 0x0000556c8f2e4af6 llvm::sys::RunSignalHandlers() /home/azureuser/torch-mlir/externals/llvm-project/llvm/lib/Support/Signals.cpp:105:5
#3 0x0000556c8f2e7245 SignalHandler(int) /home/azureuser/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
#4 0x00007f1a0f83c460 (/lib/x86_64-linux-gnu/libc.so.6+0x3c460)
#5 0x0000556c8b66fcf0 void mlir::detail::IROperandBase::insertInto<mlir::IRObjectWithUseList<mlir::OpOperand>>(mlir::IRObjectWithUseList<mlir::OpOperand>*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/UseDefLists.h:99:24
#6 0x0000556c8b66fcc1 mlir::IROperand<mlir::OpOperand, mlir::Value>::insertIntoCurrent() /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/UseDefLists.h:186:71
#7 0x0000556c8f179d76 mlir::IROperand<mlir::OpOperand, mlir::Value>::IROperand(mlir::Operation*, mlir::Value) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/UseDefLists.h:133:3
#8 0x0000556c8f178765 mlir::OpOperand::OpOperand(mlir::Operation*, mlir::Value) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/Value.h:280:38
#9 0x0000556c8f1730b6 mlir::detail::OperandStorage::OperandStorage(mlir::Operation*, mlir::OpOperand*, mlir::ValueRange) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/OperationSupport.cpp:244:41
#10 0x0000556c8f162f11 mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::DictionaryAttr, mlir::OpaqueProperties, mlir::BlockRange, unsigned int) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/Operation.cpp:145:24
#11 0x0000556c8f162a46 mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::NamedAttrList&&, mlir::OpaqueProperties, mlir::BlockRange, unsigned int) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/Operation.cpp:75:3
#12 0x0000556c8f16279b mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::NamedAttrList&&, mlir::OpaqueProperties, mlir::BlockRange, mlir::RegionRange) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/Operation.cpp:57:14
#13 0x0000556c8f16254e mlir::Operation::create(mlir::OperationState const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/Operation.cpp:36:7
#14 0x0000556c8efe7191 mlir::OpBuilder::create(mlir::OperationState const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/IR/Builders.cpp:447:17
#15 0x0000556c8c36b45b mlir::arith::MulIOp mlir::OpBuilder::create<mlir::arith::MulIOp, mlir::Value&, mlir::Value&>(mlir::Location, mlir::Value&, mlir::Value&) /home/azureuser/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/IR/Builders.h:509:11
#16 0x0000556c8c3f134d createLinalgPayloadCalculationForElementwiseOp(mlir::OpBuilder&, mlir::Location, mlir::TypeConverter const*, mlir::ValueRange, mlir::Operation*, llvm::ArrayRef<mlir::Value>) /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/Uncategorized.cpp:580:24
#17 0x0000556c8c3ed7f9 (anonymous namespace)::ConvertElementwiseOp::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const::'lambda'(mlir::OpBuilder&, mlir::Location, mlir::ValueRange)::operator()(mlir::OpBuilder&, mlir::Location, mlir::ValueRange) const /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/Uncategorized.cpp:1517:26
#18 0x0000556c8c3ed74d void llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>::callback_fn<(anonymous namespace)::ConvertElementwiseOp::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const::'lambda'(mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>(long, mlir::OpBuilder&, mlir::Location, mlir::ValueRange) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#19 0x0000556c8ca6e1c1 llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>::operator()(mlir::OpBuilder&, mlir::Location, mlir::ValueRange) const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#20 0x0000556c8ca92eee buildGenericRegion(mlir::OpBuilder&, mlir::Location, mlir::Region&, mlir::ValueRange, mlir::ValueRange, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:852:1
#21 0x0000556c8ca929ce mlir::linalg::GenericOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::TypeRange, mlir::ValueRange, mlir::ValueRange, mlir::ArrayAttr, mlir::ArrayAttr, mlir::StringAttr, mlir::StringAttr, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>, llvm::ArrayRef<mlir::NamedAttribute>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:874:1
#22 0x0000556c8ca9324c mlir::linalg::GenericOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::TypeRange, mlir::ValueRange, mlir::ValueRange, llvm::ArrayRef<mlir::AffineMap>, llvm::ArrayRef<mlir::utils::IteratorType>, llvm::StringRef, llvm::StringRef, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>, llvm::ArrayRef<mlir::NamedAttribute>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:883:3
#23 0x0000556c8ca939d0 mlir::linalg::GenericOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::TypeRange, mlir::ValueRange, mlir::ValueRange, llvm::ArrayRef<mlir::AffineMap>, llvm::ArrayRef<mlir::utils::IteratorType>, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>, llvm::ArrayRef<mlir::NamedAttribute>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:927:1
#24 0x0000556c8c43bcc4 mlir::linalg::GenericOp mlir::OpBuilder::create<mlir::linalg::GenericOp, mlir::Type, mlir::ValueRange&, mlir::Value&, llvm::SmallVector<mlir::AffineMap, 6u>&, llvm::SmallVector<mlir::utils::IteratorType, 12u>&, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>&>(mlir::Location, mlir::Type&&, mlir::ValueRange&, mlir::Value&, llvm::SmallVector<mlir::AffineMap, 6u>&, llvm::SmallVector<mlir::utils::IteratorType, 12u>&, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>&) /home/azureuser/torch-mlir/externals/llvm-project/llvm/../mlir/include/mlir/IR/Builders.h:508:5
#25 0x0000556c8c4376fe mlir::torch::torch_to_linalg::createElementwiseLinalgGeneric(mlir::OpBuilder&, mlir::Location, mlir::ValueRange, mlir::Type, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location, mlir::ValueRange)>) /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/Utils.cpp:316:8
#26 0x0000556c8c3eca83 (anonymous namespace)::ConvertElementwiseOp::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/Uncategorized.cpp:1514:21
#27 0x0000556c8dbc4c08 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1676:10
#28 0x0000556c8dc4f7de mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>)::$_0::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:208:31
#29 0x0000556c8dc4f635 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>)::$_0>(long) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#30 0x0000556c8b6ba929 llvm::function_ref<void ()>::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#31 0x0000556c8dc51045 void mlir::MLIRContext::executeAction<mlir::ApplyPatternAction, mlir::Pattern const&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pattern const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:276:3
#32 0x0000556c8dc4e0d7 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:229:9
#33 0x0000556c8dbcf360 (anonymous namespace)::OperationLegalizer::legalizeWithPattern(mlir::Operation*, mlir::ConversionPatternRewriter&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1958:21
#34 0x0000556c8dbcea79 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1866:17
#35 0x0000556c8dbcde9f (anonymous namespace)::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2377:26
#36 0x0000556c8dbc6f0e (anonymous namespace)::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>, llvm::function_ref<void (mlir::Diagnostic&)>) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2431:16
#37 0x0000556c8dbc6cd7 mlir::applyPartialConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, llvm::DenseSet<mlir::Operation*, llvm::DenseMapInfo<mlir::Operation*, void>>*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3401:22
#38 0x0000556c8dbc713e mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, llvm::DenseSet<mlir::Operation*, llvm::DenseMapInfo<mlir::Operation*, void>>*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3407:10
#39 0x0000556c8c3eade2 (anonymous namespace)::ConvertTorchToLinalg::runOnOperation() /home/azureuser/torch-mlir/lib/Conversion/TorchToLinalg/TorchToLinalg.cpp:87:16
#40 0x0000556c8dd05ffb mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:0:17
#41 0x0000556c8dd05f95 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#42 0x0000556c8b6ba929 llvm::function_ref<void ()>::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#43 0x0000556c8dd08d35 void mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:276:3
#44 0x0000556c8dd01753 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:525:17
#45 0x0000556c8dd01cd4 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:585:16
#46 0x0000556c8dd02b2e mlir::detail::OpToOpPassAdaptor::runOnOperationImpl(bool) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:726:20
#47 0x0000556c8dd023dd mlir::detail::OpToOpPassAdaptor::runOnOperation(bool) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:709:1
#48 0x0000556c8dd05fe6 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:517:11
#49 0x0000556c8dd05f95 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#50 0x0000556c8b6ba929 llvm::function_ref<void ()>::operator()() const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#51 0x0000556c8dd08d35 void mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:276:3
#52 0x0000556c8dd01753 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:525:17
#53 0x0000556c8dd01cd4 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:585:16
#54 0x0000556c8dd03718 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:896:10
#55 0x0000556c8dd03642 mlir::PassManager::run(mlir::Operation*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:876:60
#56 0x0000556c8b63ec32 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:394:17
#57 0x0000556c8b63e868 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPool*) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:459:12
#58 0x0000556c8b63e64c mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:530:12
#59 0x0000556c8b63e5e6 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#60 0x0000556c8f1d2c52 llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
#61 0x0000556c8f1d2b78 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0::operator()(llvm::StringRef) const /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Support/ToolUtilities.cpp:88:16
#62 0x0000556c8f1d29ae void llvm::interleave<llvm::StringRef const*, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, void llvm::interleave<llvm::SmallVector<llvm::StringRef, 8u>, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::raw_ostream, llvm::StringRef>(llvm::SmallVector<llvm::StringRef, 8u> const&, llvm::raw_ostream&, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::StringRef const&)::'lambda'(), void>(llvm::SmallVector<llvm::StringRef, 8u>, llvm::SmallVector<llvm::StringRef, 8u>, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::raw_ostream) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLExtras.h:2107:24
#63 0x0000556c8f1d28fa void llvm::interleave<llvm::SmallVector<llvm::StringRef, 8u>, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::raw_ostream, llvm::StringRef>(llvm::SmallVector<llvm::StringRef, 8u> const&, llvm::raw_ostream&, mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool)::$_0, llvm::StringRef const&) /home/azureuser/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLExtras.h:2128:1
#64 0x0000556c8f1d2823 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Support/ToolUtilities.cpp:95:18
#65 0x0000556c8b63b51b mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:533:10
#66 0x0000556c8b63b7b5 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:568:14
#67 0x0000556c8b63b988 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) /home/azureuser/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:584:10
#68 0x0000556c8b636ea5 main /home/azureuser/torch-mlir/tools/torch-mlir-opt/torch-mlir-opt.cpp:43:33
#69 0x00007f1a0f823a90 (/lib/x86_64-linux-gnu/libc.so.6+0x23a90)
#70 0x00007f1a0f823b49 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23b49)
#71 0x0000556c8b636d35 _start (/home/azureuser/torch-mlir/build/bin/torch-mlir-opt+0x213d35)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment