Skip to content
New issue

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

Missing Transpose Optimizations #217

Open
3 tasks
avik-pal opened this issue Jan 4, 2025 · 0 comments
Open
3 tasks

Missing Transpose Optimizations #217

avik-pal opened this issue Jan 4, 2025 · 0 comments

Comments

@avik-pal
Copy link
Collaborator

avik-pal commented Jan 4, 2025

I realized it is better to create sub-issues than open multiple issues:

module {
  func.func @main(%arg0: tensor<2x2xf64>) -> tensor<2x2xf64> {
    %cst = stablehlo.constant dense<1.000000e+00> : tensor<2x2xf64>
    %cst_0 = stablehlo.constant dense<0.000000e+00> : tensor<2x2xf64>
    %0 = stablehlo.transpose %arg0, dims = [1, 0] : (tensor<2x2xf64>) -> tensor<2x2xf64>
    %1 = stablehlo.clamp %cst_0, %0, %cst : tensor<2x2xf64>
    %2 = stablehlo.transpose %1, dims = [1, 0] : (tensor<2x2xf64>) -> tensor<2x2xf64>
    return %2 : tensor<2x2xf64>
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant