Skip to content

Commit

Permalink
Disable the sccp pass by default and add an unsupported test for sccp.
Browse files Browse the repository at this point in the history
  • Loading branch information
uazizTT committed Oct 23, 2024
1 parent c058073 commit c47e811
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/ttmlir/Dialect/TTIR/Pipelines/TTIRPipelines.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ struct StableHLOToTTIRPipelineOptions
llvm::cl::init(true)};
Option<bool> sparseConstantPropagationEnabled{
*this, "enable-sparse-constant-propagation",
llvm::cl::desc("Enable --sccp optimization pass."), llvm::cl::init(true)};
llvm::cl::desc("Enable --sccp optimization pass."),
llvm::cl::init(false)};
};

void createStableHLOToTTIRPipeline(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// UNSUPPORTED: true
// REQUIRES: stablehlo
// RUN: ttmlir-opt --stablehlo-to-ttir-pipeline %s | FileCheck %s
#any_device = #tt.operand_constraint<dram|l1|scalar|tile|any_device|any_device_tile>
module @jit_eltwise_convert attributes {} {
func.func public @test_convert(%arg0: tensor<32x32xi32>) -> tensor<32x32xi32> {
%0 = stablehlo.constant dense<0> : tensor<32x32xi32>
%1 = stablehlo.add %0, %0 : tensor<32x32xi32>
%2 = stablehlo.multiply %1, %arg0 : tensor<32x32xi32>
return %2 : tensor<32x32xi32>
// CHECK-NOT: %[[C:.*]] = "ttir.add"[[C:.*]]
}
}

0 comments on commit c47e811

Please sign in to comment.