-
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.
Uplift third_party/tt-metal to 5d0a53211ef2bfbf5f45b9f632bf360a4519a7…
…d8 2024-12-19 + cherry-picks/reverts (#1627) This PR uplifts the third_party/tt-metal to 5d0a53211ef2bfbf5f45b9f632bf360a4519a7d8 + cherry-picks/reverts 2024-12-19 (Evening) - for hang fix (tenstorrent/tt-metal#16141) needed for tt-forge-fe ReshapeOp test hang (was xfail, assert before) - Need to add new include path to find Tracy.hpp - Uplift to tt-metal branch kmabee/metal-dec19-5d0a53211-with-patches to get something stable - Add Unsupported reshape_5d.mlir test copied from tt-forge-fe ReshapeTest --------- Co-authored-by: Kyle Mabee <[email protected]>
- Loading branch information
1 parent
7e5b01a
commit c44a4bd
Showing
2 changed files
with
22 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir | ||
// RUN: FileCheck %s --input-file=%t.mlir | ||
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %t.ttnn | ||
// UNSUPPORTED: true | ||
// For ND tensors, shape dimensions greater than 4 should be 1, shape at index0 is 2 | ||
|
||
module @ReshapeTest attributes {} { | ||
func.func @forward(%arg0: tensor<4x49x384xf32> {ttir.name = "inp_1"}, %arg1: tensor<4x49x384xf32> {ttir.name = "inp_2"}) -> (tensor<196x384xf32> {ttir.name = "ReshapeTest_295.output_reshape_743"}) { | ||
%0 = tensor.empty() : tensor<4x49x384xf32> | ||
%1 = "ttir.add"(%arg0, %arg1, %0) <{operandSegmentSizes = array<i32: 2, 1>}> : (tensor<4x49x384xf32>, tensor<4x49x384xf32>, tensor<4x49x384xf32>) -> tensor<4x49x384xf32> | ||
%2 = tensor.empty() : tensor<2x2x7x7x384xf32> | ||
%3 = "ttir.reshape"(%1, %2) <{shape = [2 : i32, 2 : i32, 7 : i32, 7 : i32, 384 : i32]}> : (tensor<4x49x384xf32>, tensor<2x2x7x7x384xf32>) -> tensor<2x2x7x7x384xf32> | ||
%4 = tensor.empty() : tensor<2x7x2x7x384xf32> | ||
// CHECK: %[[C:.*]] = "ttnn.transpose"[[C:.*]] | ||
%5 = "ttir.transpose"(%3, %4) <{dim0 = -4 : si32, dim1 = -3 : si32}> : (tensor<2x2x7x7x384xf32>, tensor<2x7x2x7x384xf32>) -> tensor<2x7x2x7x384xf32> | ||
%6 = tensor.empty() : tensor<196x384xf32> | ||
%7 = "ttir.reshape"(%5, %6) <{shape = [196 : i32, 384 : i32]}> : (tensor<2x7x2x7x384xf32>, tensor<196x384xf32>) -> tensor<196x384xf32> | ||
return %7 : tensor<196x384xf32> | ||
} | ||
} |
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