• Home
  • Raw
  • Download

Lines Matching refs:xindex

4 func @f(%arg0: tensor<2x3x4xf32>) -> tensor<?xindex> {
5 // CHECK: shape.const_shape [2, 3, 4] : tensor<?xindex>
6 %0 = shape.shape_of %arg0 : tensor<2x3x4xf32> -> tensor<?xindex>
7 return %0 : tensor<?xindex>
65 func @broadcast() -> tensor<?xindex> {
66 // CHECK: shape.const_shape [7, 2] : tensor<?xindex>
67 %0 = shape.const_shape [1, 2] : tensor<?xindex>
68 %1 = shape.const_shape [7, 1] : tensor<?xindex>
70 : tensor<?xindex>, tensor<?xindex> -> tensor<?xindex>
71 return %2 : tensor<?xindex>
80 %0 = shape.const_shape [1, 2] : tensor<?xindex>
81 %1 = shape.const_shape [7, 1] : tensor<?xindex>
82 %2 = shape.broadcast %0, %1 : tensor<?xindex>, tensor<?xindex> -> !shape.shape
149 func @f() -> tensor<2xindex> {
150 // CHECK: constant dense<[0, 1]> : tensor<2xindex>
152 %0 = shape.to_extent_tensor %cs : !shape.shape -> tensor<2xindex>
153 return %0 : tensor<2xindex>
267 %0 = shape.const_shape [0, 1, 2] : tensor<?xindex>
269 %1 = shape.get_extent %0, %c2 : tensor<?xindex>, index -> index
280 %0 = shape.const_shape [0, 1, 2] : tensor<?xindex>
282 %1 = shape.get_extent %0, %c3 : tensor<?xindex>, index -> index
290 func @not_const(%arg0: tensor<?xindex>) -> index {
293 %0 = shape.get_extent %arg0, %c3 : tensor<?xindex>, index -> index
466 func @f(%arg : tensor<?xindex>) -> tensor<?xindex> {
467 // CHECK-NEXT: %[[CS:.*]] = shape.const_shape [2, 3, 4] : tensor<?xindex>
468 // CHECK-NEXT: return %[[CS]] : tensor<?xindex>
469 %0 = shape.const_shape [2, 3, 4] : tensor<?xindex>
470 %1 = shape.any %0, %arg : tensor<?xindex>, tensor<?xindex> -> tensor<?xindex>
471 return %1 : tensor<?xindex>
583 func @broadcastable_on_extent_tensors(%arg : tensor<?xindex>) {
587 %0 = shape.cstr_broadcastable %arg, %arg : tensor<?xindex>, tensor<?xindex>
623 %shape = shape.const_shape [3, 4, 5, 6, 7] : tensor<?xindex>
624 %rank = shape.rank %shape : tensor<?xindex> -> index
632 // CHECK-SAME: (%[[SHAPE:.*]]: tensor<?xindex>) -> index
633 func @dont_fold_rank(%shape : tensor<?xindex>) -> index {
634 // CHECK: %[[RESULT:.*]] = shape.rank %[[SHAPE]] : tensor<?xindex> -> index
636 %rank = shape.rank %shape : tensor<?xindex> -> index
647 %shape = shape.shape_of %arg : tensor<1x2x?xf32> -> tensor<?xindex>
648 %rank = shape.rank %shape : tensor<?xindex> -> index
670 // CHECK: %[[SHAPE:.*]] = shape.shape_of %[[ARG]] : tensor<*xf32> -> tensor<?xindex>
673 %shape = shape.shape_of %arg : tensor<*xf32> -> tensor<?xindex>
674 %rank = shape.rank %shape : tensor<?xindex> -> index
711 %1 = shape.shape_of %arg0 : tensor<?xf32> -> tensor<?xindex>
712 %2 = shape.cstr_broadcastable %0, %1 : !shape.shape, tensor<?xindex>
727 %0 = shape.shape_of %arg0 : tensor<?xf32> -> tensor<?xindex>
728 %1 = shape.shape_of %arg1 : tensor<?xf32> -> tensor<?xindex>
729 %2 = shape.cstr_broadcastable %0, %1 : tensor<?xindex>, tensor<?xindex>
742 %0 = shape.shape_of %arg1 : tensor<index> -> tensor<?xindex>
743 %1 = shape.shape_of %arg0 : tensor<*xf32> -> tensor<?xindex>
744 %2 = shape.cstr_broadcastable %0, %1 : tensor<?xindex>, tensor<?xindex>
757 %b = shape.const_shape [1, 2, 3] : tensor<?xindex>
758 %result = shape.shape_eq %a, %b : !shape.shape, tensor<?xindex>
769 %a = shape.const_shape [1, 2, 3] : tensor<?xindex>
770 %b = shape.const_shape [4, 5, 6] : tensor<?xindex>
771 %result = shape.shape_eq %a, %b : tensor<?xindex>, tensor<?xindex>
855 func @fold_to_extent_tensor_on_tensor(%arg: tensor<?xindex>) -> tensor<?xindex> {
857 %casted = shape.to_extent_tensor %arg : tensor<?xindex> -> tensor<?xindex>
858 return %casted : tensor<?xindex>
865 func @fold_assuming_all_single_element(%arg: tensor<?xindex>) {
877 func @fold_tensor_cast_of_const_shape(%arg: tensor<?xindex>) {
879 %0 = shape.const_shape [2] : tensor<?xindex>
880 %1 = tensor_cast %0 : tensor<?xindex> to tensor<1xindex>
881 %2 = shape.cstr_broadcastable %1, %0 : tensor<1xindex>, tensor<?xindex>