Skip to content

Instantly share code, notes, and snippets.

@archana-ramalingam
Last active May 11, 2024 05:05
Show Gist options
  • Save archana-ramalingam/b14f747da4752bb8eb9e0b85d8327f35 to your computer and use it in GitHub Desktop.
Save archana-ramalingam/b14f747da4752bb8eb9e0b85d8327f35 to your computer and use it in GitHub Desktop.
SHARK-TestSuite/e2eshark/test-run/onnx/operators/ReduceLogSumExp/torch-mlir.log
%int7 = torch.constant.int 7 castDType
!torch.vtensor<[2,3,4],f64> f64ResultType
%0 = torch.aten.to.dtype %arg0, %int7, %false, %false, %none_0 : !torch.vtensor<[2,3,4],f32>, !torch.int, !torch.bool, !torch.bool, !torch.none -> !torch.vtensor<[2,3,4],f64> AtenToDtypeOp
%1 = torch.aten.exp %0 : !torch.vtensor<[2,3,4],f64> -> !torch.vtensor<[2,3,4],f64> AtenExpOp
!torch.vtensor<[1,1,1],f64> f64ReduceType
%3 = torch.aten.sum.dim_IntList %1, %2, %true, %none_1 : !torch.vtensor<[2,3,4],f64>, !torch.list<int>, !torch.bool, !torch.none -> !torch.vtensor<[1,1,1],f64> reducedSumImpl
%4 = torch.aten.log %3 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> AtenLogOp
%4 = torch.aten.log %3 : !torch.vtensor<[1,1,1],f64> -> !torch.vtensor<[2,3,4],f64> finalResult
ReduceLogSumExp.default.torch-onnx.mlir:4:10: error: 'tensor.cast' op operand type 'tensor<1x1x1xf64>' and result type 'tensor<2x3x4xf64>' are cast incompatible
%0 = torch.operator "onnx.ReduceLogSumExp"(%arg0) : (!torch.vtensor<[2,3,4],f32>) -> !torch.vtensor<[1,1,1],f32>
^
ReduceLogSumExp.default.torch-onnx.mlir:4:10: note: see current operation: %42 = "tensor.cast"(%41) : (tensor<1x1x1xf64>) -> tensor<2x3x4xf64>
@archana-ramalingam
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment