-
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.
Renamed params in transpose op (#335)
* Renamed tranpose operands to dim0 and dim1, to match Forge. * Updated tensor sizes in tests to match allowed buffer sizes.
- Loading branch information
1 parent
a79d106
commit 8021450
Showing
12 changed files
with
53 additions
and
55 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
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
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
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
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
8 changes: 4 additions & 4 deletions
8
test/ttmlir/Dialect/TTNN/transpose/simple_transpose_8x16_reverse_dims.mlir
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// RUN: ttmlir-opt --ttir-load-system-desc --ttir-layout --ttnn-open-device --convert-ttir-to-ttnn %s | FileCheck %s | ||
#any_device_tile = #tt.operand_constraint<dram|l1|tile|any_device_tile> | ||
module attributes {} { | ||
func.func @forward(%arg0: tensor<8x16xbf16>) -> tensor<16x8xbf16> { | ||
%0 = tensor.empty() : tensor<16x8xbf16> | ||
func.func @forward(%arg0: tensor<64x16xbf16>) -> tensor<16x64xbf16> { | ||
%0 = tensor.empty() : tensor<16x64xbf16> | ||
// CHECK: %[[C:.*]] = "ttnn.transpose"[[C:.*]] | ||
%1 = "ttir.transpose"(%arg0, %0) <{dimension1 = 1 : si32, dimension2 = 0 : si32, operand_constraints = [#any_device_tile, #any_device_tile]}> : (tensor<8x16xbf16>, tensor<16x8xbf16>) -> tensor<16x8xbf16> | ||
return %1 : tensor<16x8xbf16> | ||
%1 = "ttir.transpose"(%arg0, %0) <{dim0 = 1 : si32, dim1 = 0 : si32, operand_constraints = [#any_device_tile, #any_device_tile]}> : (tensor<64x16xbf16>, tensor<16x64xbf16>) -> tensor<16x64xbf16> | ||
return %1 : tensor<16x64xbf16> | ||
} | ||
} |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// RUN: ttmlir-opt --ttir-load-system-desc --ttir-layout --ttnn-open-device --convert-ttir-to-ttnn %s | FileCheck %s | ||
#any_device = #tt.operand_constraint<dram|l1|tile|any_device|any_device_tile> | ||
module attributes {} { | ||
func.func @forward(%arg0: tensor<8x8xbf16>) -> tensor<8x8xbf16> { | ||
%0 = tensor.empty() : tensor<8x8xbf16> | ||
func.func @forward(%arg0: tensor<32x32xbf16>) -> tensor<32x32xbf16> { | ||
%0 = tensor.empty() : tensor<32x32xbf16> | ||
// CHECK: %[[C:.*]] = "ttnn.transpose"[[C:.*]] | ||
%1 = "ttir.transpose"(%arg0, %0) <{dimension1 = 0 : si32, dimension2 = 1 : si32, operand_constraints = [#any_device, #any_device]}> : (tensor<8x8xbf16>, tensor<8x8xbf16>) -> tensor<8x8xbf16> | ||
return %1 : tensor<8x8xbf16> | ||
%1 = "ttir.transpose"(%arg0, %0) <{dim0 = 0 : si32, dim1 = 1 : si32, operand_constraints = [#any_device, #any_device]}> : (tensor<32x32xbf16>, tensor<32x32xbf16>) -> tensor<32x32xbf16> | ||
return %1 : tensor<32x32xbf16> | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
test/ttmlir/Dialect/TTNN/transpose/simple_transpose_negative_dims.mlir
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// RUN: ttmlir-opt --ttir-load-system-desc --ttir-layout --ttnn-open-device --convert-ttir-to-ttnn %s | FileCheck %s | ||
#any_device_tile = #tt.operand_constraint<dram|l1|tile|any_device_tile> | ||
module attributes {} { | ||
func.func @forward(%arg0: tensor<8x8xbf16>) -> tensor<8x8xbf16> { | ||
%0 = tensor.empty() : tensor<8x8xbf16> | ||
func.func @forward(%arg0: tensor<32x32xbf16>) -> tensor<32x32xbf16> { | ||
%0 = tensor.empty() : tensor<32x32xbf16> | ||
// CHECK: %[[C:.*]] = "ttnn.transpose"[[C:.*]] | ||
%1 = "ttir.transpose"(%arg0, %0) <{dimension1 = -1 : si32, dimension2 = -2 : si32, operand_constraints = [#any_device_tile, #any_device_tile]}> : (tensor<8x8xbf16>, tensor<8x8xbf16>) -> tensor<8x8xbf16> | ||
return %1 : tensor<8x8xbf16> | ||
%1 = "ttir.transpose"(%arg0, %0) <{dim0 = -1 : si32, dim1 = -2 : si32, operand_constraints = [#any_device_tile, #any_device_tile]}> : (tensor<32x32xbf16>, tensor<32x32xbf16>) -> tensor<32x32xbf16> | ||
return %1 : tensor<32x32xbf16> | ||
} | ||
} |