-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added conversion from stablehlo.transposeOp to ttir.transposeOp (#641)
* Added conversion from stablehlo.transposeOp to ttir.transposeOp with assertion to limit conversion to two-dimensional inputs only. * Refactor reduce op conversion pattern to concrete class and renamed stablehlo tests.
- Loading branch information
Showing
2 changed files
with
54 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// REQUIRES: stablehlo | ||
// RUN: ttmlir-opt --stablehlo-to-ttir-pipeline %s | FileCheck %s | ||
module @jit_transpose attributes {} { | ||
func.func public @test_transpose(%arg0: tensor<64x128xf32>) -> tensor<128x64xf32> { | ||
%0 = stablehlo.transpose %arg0, dims = [1,0] : (tensor<64x128xf32>) -> tensor<128x64xf32> | ||
// CHECK: %[[C:.*]] = tensor.empty[[C:.*]] | ||
// CHECK: %[[C:.*]] = "ttir.transpose"[[C:.*]] | ||
return %0 : tensor<128x64xf32> | ||
} | ||
} |