We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module { func.func @main(%arg0: tensor<1x3x2x2xf32>) -> (tensor<1x3x2x2xf32>, tensor<1x3x2x2xf32>) { %cst = stablehlo.constant dense<0.317560464> : tensor<1x3x2x2xf32> %cst_0 = stablehlo.constant dense<1.23323452> : tensor<1x3x2x2xf32> %0 = stablehlo.multiply %cst_0, %arg0 : tensor<1x3x2x2xf32> %1 = stablehlo.add %cst, %0 : tensor<1x3x2x2xf32> %2 = stablehlo.transpose %1, dims = [3, 2, 1, 0] : (tensor<1x3x2x2xf32>) -> tensor<2x2x3x1xf32> %3 = stablehlo.cosine %2 : tensor<2x2x3x1xf32> %4 = stablehlo.sine %2 : tensor<2x2x3x1xf32> %5 = stablehlo.transpose %4, dims = [3, 2, 1, 0] : (tensor<2x2x3x1xf32>) -> tensor<1x3x2x2xf32> %6 = stablehlo.transpose %3, dims = [3, 2, 1, 0] : (tensor<2x2x3x1xf32>) -> tensor<1x3x2x2xf32> return %5, %6 : tensor<1x3x2x2xf32>, tensor<1x3x2x2xf32> } }
The text was updated successfully, but these errors were encountered:
This is probably a bit more involved, we need to check if uses of %2 are in unary operations where eliminating the transpose is a valid op.
%2
%2 = stablehlo.transpose %1, dims = [3, 2, 1, 0] : (tensor<1x3x2x2xf32>) -> tensor<2x2x3x1xf32> %3 = stablehlo.cosine %2 : tensor<2x2x3x1xf32> %4 = stablehlo.sine %2 : tensor<2x2x3x1xf32>
Sorry, something went wrong.
We need 2 transforms here:
Transpose -> Unary Op -> Transpose
Unary Op
Transpose -> Unary Op
Unary Op -> Transpose
No branches or pull requests
The text was updated successfully, but these errors were encountered: