Skip to content

Commit

Permalink
Add silicon stablehlo test for round
Browse files Browse the repository at this point in the history
  • Loading branch information
ddilbazTT committed Dec 20, 2024
1 parent 2250958 commit 001f3c1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/ttmlir/Silicon/StableHLO/Unary/round_op.mlir
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// REQUIRES: stablehlo
// RUN: rm -rf %t.ttnn
// RUN: rm -rf %t.mlir
// RUN: ttmlir-opt --stablehlo-to-ttir-pipeline %s | \
// RUN: ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=%system_desc_path%" > %t.mlir
// RUN: ttmlir-translate --ttnn-to-flatbuffer %t.mlir > %t.ttnn
// RU1N: FileCheck --input-file=%t.mlir %s

module @jit_gather attributes {} {
func.func public @test_round(%arg0: tensor<4xbf16>) -> tensor<4xbf16> {
// CHECK-LABEL: func.func public @test_gather_0
// CHECK: ttnn.empty
// CHECK: ttnn.round
// CHECK-SAME: tensor<4xbf16>
// CHECK-SAME: tensor<4xbf16>
// CHECK-SAME: tensor<4xbf16>
%0 = stablehlo.round_nearest_afz %arg0 : tensor<4xbf16>
return %0 : tensor<4xbf16>
}
}

0 comments on commit 001f3c1

Please sign in to comment.