Skip to content

Commit

Permalink
Added test for get_dimension_size -> constant conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
azecevicTT committed Dec 12, 2024
1 parent 865658f commit 2ec80f3
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: ttmlir-opt --ttir-to-ttir-decomposition %s | FileCheck %s
module {
func.func @get_dimension_size_decomposition(%arg0: tensor<32x64x128xf32>) -> tensor<1xi32> {
// CHECK: [[VAL:%.+]] = "ttir.constant"
// CHECK-SAME: value = dense<128> : tensor<1xi32>
// CHECK: return [[VAL]] : tensor<1xi32>
%0 = "ttir.get_dimension_size"(%arg0) <{dimension = 2 : i32}> : (tensor<32x64x128xf32>) -> tensor<1xi32>
return %0 : tensor<1xi32>
}
}

0 comments on commit 2ec80f3

Please sign in to comment.