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

Add Hoist Passes to TTIR to TTNN Pipeline #2148

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6091872
Uplift third_party/tt-metal to b552fb8ae14236777983e3521a312dd78432f0…
vmilosevic Feb 7, 2025
0ccada8
Merge branch 'main' into vwells/cpu_hoist_opt_pipeline
vwellsTT Feb 7, 2025
a8cbdb5
cleanup
vwellsTT Feb 7, 2025
68b12d0
fixes for tests
vwellsTT Feb 7, 2025
7af9b80
fix
vwellsTT Feb 7, 2025
c6359c3
fix tests pt 2
vwellsTT Feb 7, 2025
2fa45d1
Merge branch 'main' into vwells/cpu_hoist_opt_pipeline
vwellsTT Feb 19, 2025
eba8e1a
oops
vwellsTT Feb 19, 2025
afee057
Merge branch 'main' into vwells/cpu_hoist_opt_pipeline
vwellsTT Feb 19, 2025
f01635d
fix broken tests? (terrible commit)
vwellsTT Feb 19, 2025
9421469
remove debug change
vwellsTT Feb 19, 2025
0f71a7a
remove unrelated changes
vwellsTT Feb 19, 2025
de65618
Merge branch 'main' into vwells/cpu_hoist_opt_pipeline
vwellsTT Feb 21, 2025
62d9b1b
Merge branch 'main' into vwells/cpu_hoist_opt_pipeline
vwellsTT Feb 21, 2025
57b90c9
tidy
vwellsTT Feb 21, 2025
5444449
remove ugly empty attributes in test case
vwellsTT Feb 21, 2025
938a719
remove dtype from func names in testcase
vwellsTT Feb 21, 2025
846ebe1
Merge branch 'main' into vwells/cpu_hoist_opt_pipeline
vwellsTT Feb 25, 2025
454a60b
try adding module unwrap to TTNNToEmitC directly
vwellsTT Feb 25, 2025
6a9c4b6
cleanup other 2 testcases
vwellsTT Feb 25, 2025
0ddef6f
missed a spot
vwellsTT Feb 25, 2025
ffe76ad
cleanup a comment
vwellsTT Feb 25, 2025
aaa0e20
rm llm-generated comments
vwellsTT Feb 25, 2025
b26226d
fix up TTNNModifySignaturesForDylib
vwellsTT Feb 25, 2025
5c972c3
Merge branch 'main' into vwells/cpu_hoist_opt_pipeline
vwellsTT Feb 25, 2025
f76ce66
fixes
vwellsTT Feb 25, 2025
5b19aa3
undo 'cursor in wrong window' change
vwellsTT Feb 25, 2025
770d1bf
try to fix sys_desc issue for cases where we add ttir sys_desc via se…
vwellsTT Feb 25, 2025
35c2d0f
rm spurious changes
vwellsTT Feb 25, 2025
55b172d
change 1 testcase
vwellsTT Feb 26, 2025
fb4a2bb
Merge branch 'main' into vwells/cpu_hoist_opt_pipeline
vwellsTT Feb 26, 2025
03b843d
attempt to make explorer robust to nested modules
vwellsTT Feb 26, 2025
f3cce26
add some nasty debug stuff because I can't run this locally :(
vwellsTT Feb 26, 2025
5ba9352
doh
vwellsTT Feb 26, 2025
2d56702
aha, need to somehow preserve named locations in nested module
vwellsTT Feb 26, 2025
5c57249
try some debugs?
vwellsTT Feb 27, 2025
ecb1d59
maybe fix?
vwellsTT Feb 27, 2025
233f253
try new approach
vwellsTT Feb 27, 2025
11aa625
try refactoring a bit
vwellsTT Feb 27, 2025
98699db
works locally
vwellsTT Feb 27, 2025
f4d80ea
cleanup
vwellsTT Feb 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/ttmlir/RegisterAll.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class DialectRegistry;
namespace mlir::tt {

void registerAllDialects(mlir::DialectRegistry &registry);
void registerAllExternalInterfaces(mlir::DialectRegistry &registry);
void registerAllExtensions(mlir::DialectRegistry &registry);
void registerAllPasses();

Expand Down
7 changes: 7 additions & 0 deletions lib/Dialect/TT/Transforms/TTModuleWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ class TTUnwrapDeviceModulePass
topLevelBody.getOperations().splice(topLevelBody.end(),
innerBody.getOperations());

// Also transfer any attributes, e.g. system_desc, device
for (const auto &attr : innerModule->getAttrs()) {
if (!rootModule->hasAttr(attr.getName())) {
rootModule->setAttr(attr.getName(), attr.getValue());
}
}

deviceOp->erase();
}
};
Expand Down
3 changes: 2 additions & 1 deletion lib/Dialect/TTIR/Pipelines/TTIRPipelines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ void createLinalgToLLVMPipeline(OpPassManager &manager,
const LinalgToLLVMPipelineOptions &options) {
// These are initial passes to ensure we start with well-form linalg dialect
// operations.
manager.addPass(mlir::createCanonicalizerPass());
// TODO (#2145): Explore ways to re-enable canonicalizer w/o return values for
// linalg funcs. manager.addPass(mlir::createCanonicalizerPass());
manager.addPass(mlir::createConvertElementwiseToLinalgPass());
manager.addPass(mlir::createConvertTensorToLinalgPass());

Expand Down
6 changes: 6 additions & 0 deletions lib/Dialect/TTNN/Pipelines/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ add_mlir_dialect_library(MLIRTTNNPipelines
${PROJECT_SOURCE_DIR}/include/ttmlir

LINK_LIBS PUBLIC
MLIRLLVMTransforms
MLIRTTIRDialect
MLIRTTUtils
MLIRTTNNDialect
MLIRTTIRPipelines
MLIRTTIRTransforms
MLIRTTNNTransforms
MLIRTTNNAnalysis
MLIRTTTransforms
MLIRPass
MLIRTransforms
)
34 changes: 27 additions & 7 deletions lib/Dialect/TTNN/Pipelines/TTNNPipelines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

#include "ttmlir/Conversion/Passes.h"
#include "ttmlir/Conversion/TTNNToEmitC/TTNNToEmitC.h"
#include "ttmlir/Dialect/LLVM/Transforms/Passes.h"
#include "ttmlir/Dialect/TT/IR/TTOps.h"
#include "ttmlir/Dialect/TT/Transforms/Passes.h"
#include "ttmlir/Dialect/TTIR/Pipelines/TTIRPipelines.h"
#include "ttmlir/Dialect/TT/Utils/PopulateArgumentTypes.h"
#include "ttmlir/Dialect/TTIR/Transforms/Passes.h"
#include "ttmlir/Dialect/TTNN/Transforms/Passes.h"
Expand Down Expand Up @@ -138,18 +142,34 @@ void createTTNNPipelineTTIRImplicitBroadcastFoldPassFromString(

void createTTIRToTTNNBackendPipeline(
OpPassManager &pm, const TTIRToTTNNBackendPipelineOptions &options) {
createTTNNPipelineTTIRPasses(pm, options);
createTTNNPipelineTTIRImplicitBroadcastFoldPass(pm, options);
createTTNNPipelineLoweringPasses(pm, options);
createTTNNPipelineWorkaroundPass(pm, options);
createTTNNPipelineAnalysisPasses(pm, options);
createTTNNPipelineLayoutDecompositionPass(pm, options);
createTTNNPipelineDeallocPass(pm, options);
// Create DeviceModule to wrap all ops.
pm.addPass(tt::createTTWrapDeviceModulePass());
// Create CPUModuleOp to wrap hoisted ops (if any).
pm.addPass(ttir::createTTIRHoistTransform());

// Run regular TTIR to TTNN pipeline on DeviceModule.
OpPassManager &devicePm =
pm.nest<tt::DeviceModuleOp>().nest<mlir::ModuleOp>();
createTTNNPipelineTTIRPasses(devicePm, options);
createTTNNPipelineTTIRImplicitBroadcastFoldPass(devicePm, options);
createTTNNPipelineLoweringPasses(devicePm, options);
createTTNNPipelineWorkaroundPass(devicePm, options);
createTTNNPipelineAnalysisPasses(devicePm, options);
createTTNNPipelineLayoutDecompositionPass(devicePm, options);
createTTNNPipelineDeallocPass(devicePm, options);

// Run lowering to LLVM pass on hoisted funcs in CPUModule.
OpPassManager &cpuPm = pm.nest<tt::CPUModuleOp>().nest<mlir::ModuleOp>();
cpuPm.addPass(createConvertTTIRToLinalgPass());
ttir::LinalgToLLVMPipelineOptions linalgToLLLVMOptions;
ttir::createLinalgToLLVMPipeline(cpuPm, linalgToLLLVMOptions);
cpuPm.addPass(llvm_util::createLLVMEmitCallingConventionWrapperFuncs());
}

void createTTIRToEmitCPipeline(OpPassManager &pm,
const TTIRToEmitCPipelineOptions &options) {
createTTIRToTTNNBackendPipeline(pm, options);
pm.addPass(tt::createTTUnwrapDeviceModulePass());
pm.addPass(createTTNNCreateInputGenerators());
pm.addPass(createConvertTTNNToEmitCPass());
}
Expand Down
1 change: 1 addition & 0 deletions lib/RegisterAll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void mlir::tt::registerAllDialects(mlir::DialectRegistry &registry) {
registry);
tensor::registerBufferizableOpInterfaceExternalModels(registry);
vector::registerBufferizableOpInterfaceExternalModels(registry);
LLVM::registerInlinerInterface(registry);
}

void mlir::tt::registerAllExtensions(mlir::DialectRegistry &registry) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --ttnn-modify-signatures-for-dylib %s | FileCheck %s
// RUN: ttmlir-opt --pass-pipeline="builtin.module(ttir-to-ttnn-backend-pipeline{system-desc-path=%system_desc_path%}, tt.device_module(builtin.module(ttnn-modify-signatures-for-dylib)))" %s | FileCheck %s

module attributes {} {
// CHECK: func.func @add(%arg0: tuple<[[TENSOR_A:.*>]], [[TENSOR_B:.*>]]>, %arg1: !tt.device<#device>) -> tuple<tensor<32x32xbf16, #ttnn_layout>> {
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/Dialect/TTNN/pipelines/ttir_to_emitc_add.mlir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: ttmlir-opt --ttir-to-emitc-pipeline="system-desc-path=%system_desc_path%" %s > %direct.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --ttnn-create-input-gens --convert-ttnn-to-emitc %s > %indirect.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module --ttnn-create-input-gens --convert-ttnn-to-emitc %s > %indirect.mlir
// RUN: diff %direct.mlir %indirect.mlir
//
// This test checks that the (TTIR to EmitC pipeline) is equivalent to (TTIR to TTNN pipeline + dialect conversion from TTNN to EmitC).
Expand Down
17 changes: 13 additions & 4 deletions test/ttmlir/Dialect/TTNN/ttir_to_ttnn_pipeline_hoist_call.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
module attributes {} {
// CHECK-DAG: #{{.*}} = #ttnn.ttnn_layout<(d0, d1) -> (d0, d1), <1x1>, memref<64x128xf32, #system_memory>>
// CHECK-DAG: #{{.*}} = #ttnn.ttnn_layout<(d0, d1) -> (d0, d1), <1x1>, memref<2x4x!tt.tile<32x32, f32>, #dram>, <interleaved>>

// CHECK: tt.device_module {
// CHECK: builtin.module attributes {{.*}} {
// CHECK: func.func @forward
func.func @forward(%arg0: tensor<64x128xf32>, %arg1: tensor<64x128xf32>) -> tensor<64x128xf32> {
// CHECK: %{{.*}} = "ttnn.empty"(%{{.*}})
%0 = tensor.empty() : tensor<64x128xf32>
Expand All @@ -10,11 +14,12 @@ module attributes {} {
// CHECK: %{{.*}} = "ttnn.ones"
%2 = "ttir.ones"() <{shape = array<i32:64, 128>}> : () -> tensor<64x128xf32>
// CHECK: %{{.*}} = "ttnn.from_device"(%{{.*}}) : (tensor<[[DIMS:.*]], #{{.*}}>) -> tensor<[[DIMS]], #{{.*}}>
// CHECK: %{{.*}} = call @hoisted_func_decl(%{{.*}}, %{{.*}}, %{{.*}})
%3 = call @hoisted_func_decl(%arg0, %1, %2) {ttir.hoisted_call} : (tensor<64x128xf32>, tensor<64x128xf32>, tensor<64x128xf32>) -> tensor<64x128xf32>
// CHECK: %{{.*}} = call @hoisted_ttir_add_64x128xf32_64x128xf32_64x128xf32_func_decl(%{{.*}}, %{{.*}}, %{{.*}})
%3 = "ttir.add"(%arg0, %1, %2) <{operandSegmentSizes = array<i32: 2, 1>}> {should_hoist} : (tensor<64x128xf32>, tensor<64x128xf32>, tensor<64x128xf32>) -> tensor<64x128xf32>
// CHECK: %{{.*}} = "ttnn.zeros"
%4 = "ttir.zeros"() <{shape = array<i32:64, 128>}> : () -> tensor<64x128xf32>
%5 = call @hoisted_func_decl(%arg0, %3, %4) {ttir.hoisted_call} : (tensor<64x128xf32>, tensor<64x128xf32>, tensor<64x128xf32>) -> tensor<64x128xf32>
// CHECK: %{{.*}} = call @hoisted_ttir_add_64x128xf32_64x128xf32_64x128xf32_func_decl(%{{.*}}, %{{.*}}, %{{.*}})
%5 = "ttir.add"(%arg0, %3, %4) <{operandSegmentSizes = array<i32: 2, 1>}> {should_hoist} : (tensor<64x128xf32>, tensor<64x128xf32>, tensor<64x128xf32>) -> tensor<64x128xf32>
// CHECK: %{{.*}} = "ttnn.empty"(%{{.*}})
%6 = tensor.empty() : tensor<64x128xf32>
// CHECK: %{{.*}} = "ttnn.to_layout"(%{{.*}}) <{layout = #ttnn.layout<{{.*}}>}> : (tensor<[[DIMS:.*]], #{{.*}}>) -> tensor<[[DIMS]], #{{.*}}>
Expand All @@ -25,5 +30,9 @@ module attributes {} {
%7 = "ttir.multiply"(%3, %5, %6) <{operandSegmentSizes = array<i32: 2, 1>}> : (tensor<64x128xf32>, tensor<64x128xf32>, tensor<64x128xf32>) -> tensor<64x128xf32>
return %7 : tensor<64x128xf32>
}
func.func private @hoisted_func_decl(tensor<64x128xf32>, tensor<64x128xf32>, tensor<64x128xf32>) -> tensor<64x128xf32>
// CHECK: func.func private @hoisted_ttir_add_64x128xf32_64x128xf32_64x128xf32_func_decl
// CHECK: tt.cpu_module {
// CHECK: builtin.module {
// CHECK: llvm.func @hoisted_ttir_add_64x128xf32_64x128xf32_64x128xf32_func
// CHECK: llvm.func @hoisted_ttir_add_64x128xf32_64x128xf32_64x128xf32_func_helper(%arg0: !llvm.ptr)
}
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_binary/add.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_binary/multiply.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_binary/power.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_binary/subtract.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/cbrt.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/ceil.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/cos.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/exp.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/expm1.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/floor.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/gelu.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/isfinite.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/log.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/log1p.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/neg.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/reciprocal.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/relu.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/rsqrt.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/sigmoid.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/sign.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/sin.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/sqrt.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/tan.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/ttmlir/EmitC/TTNN/eltwise_unary/tanh.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" %s > %t.mlir
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" --tt-unwrap-device-module %s > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %basename_t.ttnn
// RUN: ttmlir-opt --ttnn-modify-signatures-for-dylib --convert-ttnn-to-emitc %t.mlir > %t2.mlir
// RUN: ttmlir-translate --mlir-to-cpp %t2.mlir > %basename_t.cpp
Expand Down
Loading
Loading