Lines Matching refs:xindex
19 func @extent_tensor_num_elements(%shape : tensor<?xindex>) -> index {
21 %num_elements = shape.reduce(%shape, %init) : tensor<?xindex> -> index {
38 %1 = shape.const_shape [4, 5, 6] : tensor<?xindex>
57 func @test_broadcast_extents() -> tensor<?xindex> {
58 %0 = shape.const_shape [10, 1, 57, 92] : tensor<?xindex>
59 %1 = shape.const_shape [4, 57, 92] : tensor<?xindex>
60 %2 = shape.broadcast %0, %1 : tensor<?xindex>, tensor<?xindex> -> tensor<?xindex>
61 return %2 : tensor<?xindex>
91 %2 = shape.const_shape [1, 2, 3] : tensor<?xindex>
95 func @test_shape_of(%arg0: tensor<?xf32>) -> tensor<?xindex> {
96 %0 = shape.shape_of %arg0 : tensor<?xf32> -> tensor<?xindex>
97 return %0 : tensor<?xindex>
117 func @broadcastable_on_extent_tensors(%lhs : tensor<?xindex>,
118 %rhs : tensor<?xindex>) {
119 %w0 = shape.cstr_broadcastable %lhs, %rhs : tensor<?xindex>, tensor<?xindex>
151 func @test_to_extent_tensor(%arg: !shape.shape) -> tensor<3xindex> {
152 %0 = shape.to_extent_tensor %arg : !shape.shape -> tensor<3xindex>
153 return %0 : tensor<3xindex>
156 func @test_from_extent_tensor(%arg: tensor<?xindex>) -> !shape.shape {
157 %0 = shape.from_extent_tensor %arg : tensor<?xindex>
166 func @rank_on_extent_tensor(%shape : tensor<?xindex>) -> index {
167 %rank = shape.rank %shape : tensor<?xindex> -> index
177 func @shape_eq_on_tensors(%a : tensor<?xindex>, %b : tensor<?xindex>) -> i1 {
178 %result = shape.shape_eq %a, %b : tensor<?xindex>, tensor<?xindex>
182 func @shape_eq_on_mixed(%a : tensor<?xindex>, %b : !shape.shape) -> i1 {
183 %result = shape.shape_eq %a, %b : tensor<?xindex>, !shape.shape
194 func @get_extent_on_extent_tensor(%arg : tensor<?xindex>) -> index {
196 %result = shape.get_extent %arg, %c0 : tensor<?xindex>, index -> index
200 func @get_extent_on_mixed_operands(%arg : tensor<?xindex>) -> !shape.size {
202 %result = shape.get_extent %arg, %c0 : tensor<?xindex>, !shape.size -> !shape.size
210 %3 = shape.const_shape [1, 2, 3] : tensor<?xindex>
211 %4 = shape.const_shape [4, 5, 6] : tensor<?xindex>
212 %5 = "shape.any"(%3, %4) : (tensor<?xindex>, tensor<?xindex>) -> tensor<?xindex>
216 func @num_elements_extent_tensor(%arg : tensor<?xindex>) -> index {
217 %result = shape.num_elements %arg : tensor<?xindex> -> index
248 func @any_on_mixed(%a : tensor<?xindex>,
249 %b : tensor<?xindex>,
252 : tensor<?xindex>, tensor<?xindex>, !shape.shape -> !shape.shape
256 func @any_on_extent_tensors(%a : tensor<?xindex>,
257 %b : tensor<?xindex>,
258 %c : tensor<?xindex>) -> tensor<?xindex> {
260 : tensor<?xindex>, tensor<?xindex>, tensor<?xindex> -> tensor<?xindex>
261 return %result : tensor<?xindex>
264 func @is_broadcastable_on_extent_tensors(%a : tensor<?xindex>,
265 %b : tensor<?xindex>) -> i1 {
267 : tensor<?xindex>, tensor<?xindex>