|
3 | 3 | // ----- |
4 | 4 |
|
5 | 5 | // CHECK-LABEL: func.func @nop( |
6 | | -// CHECK-SAME: %[[A:.*]]: tensor<100xf32>) -> tensor<100xf32> attributes {llvm.emit_c_interface} { |
| 6 | +// CHECK-SAME: %[[A:.*]]: tensor<100xf32>) -> tensor<100xf32> { |
7 | 7 | // CHECK: return %[[A]] : tensor<100xf32> |
8 | 8 | // CHECK: } |
9 | | -func.func @nop(%arg0: tensor<100xf32>) -> tensor<100xf32> attributes { llvm.emit_c_interface } { |
| 9 | +func.func @nop(%arg0: tensor<100xf32>) -> tensor<100xf32> { |
10 | 10 | return %arg0 : tensor<100xf32> |
11 | 11 | } |
12 | 12 |
|
13 | 13 | // ----- |
14 | 14 |
|
15 | | -// CHECK-LABEL: func.func @spiface_sparse_in( |
| 15 | +// CHECK-LABEL: func.func @sparse_in( |
16 | 16 | // CHECK-SAME: %[[A:.*]]: tensor<?xf32>, |
17 | 17 | // CHECK-SAME: %[[B:.*]]: tensor<?xindex>, |
18 | | -// CHECK-SAME: %[[C:.*]]: tensor<?xindex>) -> tensor<64x64xf32> attributes {llvm.emit_c_interface} { |
| 18 | +// CHECK-SAME: %[[C:.*]]: tensor<?xindex>) -> tensor<64x64xf32> { |
19 | 19 | // CHECK: %[[I:.*]] = sparse_tensor.assemble %[[A]], %[[B]], %[[C]] |
20 | | -// CHECK: %[[F:.*]] = call @sparse_in(%[[I]]) |
| 20 | +// CHECK: %[[F:.*]] = call @_internal_sparse_in(%[[I]]) |
21 | 21 | // CHECK: return %[[F]] : tensor<64x64xf32> |
22 | 22 | // CHECK: } |
| 23 | +// CHECK: func.func private @_internal_sparse_in |
23 | 24 | #sparse = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }> |
24 | | -func.func @sparse_in(%arg0: tensor<64x64xf32, #sparse>) -> tensor<64x64xf32> attributes { llvm.emit_c_interface } { |
| 25 | +func.func @sparse_in(%arg0: tensor<64x64xf32, #sparse>) -> tensor<64x64xf32> { |
25 | 26 | %0 = sparse_tensor.convert %arg0 : tensor<64x64xf32, #sparse> to tensor<64x64xf32> |
26 | 27 | return %0 : tensor<64x64xf32> |
27 | 28 | } |
28 | 29 |
|
29 | 30 | // ----- |
30 | 31 |
|
31 | | -// CHECK-LABEL: func.func @spiface_sparse_in2( |
| 32 | +// CHECK-LABEL: func.func @sparse_in2( |
32 | 33 | // CHECK-SAME: %[[X:.*]]: tensor<100xf32>, |
33 | 34 | // CHECK-SAME: %[[A:.*]]: tensor<?xf32>, |
34 | 35 | // CHECK-SAME: %[[B:.*]]: tensor<?xindex>, |
35 | | -// CHECK-SAME: %[[C:.*]]: tensor<?xindex>) -> tensor<64x64xf32> attributes {llvm.emit_c_interface} { |
| 36 | +// CHECK-SAME: %[[C:.*]]: tensor<?xindex>) -> tensor<64x64xf32> { |
36 | 37 | // CHECK: %[[I:.*]] = sparse_tensor.assemble %[[A]], %[[B]], %[[C]] |
37 | | -// CHECK: %[[F:.*]] = call @sparse_in2(%[[X]], %[[I]]) |
| 38 | +// CHECK: %[[F:.*]] = call @_internal_sparse_in2(%[[X]], %[[I]]) |
38 | 39 | // CHECK: return %[[F]] : tensor<64x64xf32> |
39 | 40 | // CHECK: } |
| 41 | +// CHECK: func.func private @_internal_sparse_in2 |
40 | 42 | #sparse = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }> |
41 | | -func.func @sparse_in2(%arg0: tensor<100xf32>, %arg1: tensor<64x64xf32, #sparse>) -> tensor<64x64xf32> attributes { llvm.emit_c_interface } { |
| 43 | +func.func @sparse_in2(%arg0: tensor<100xf32>, %arg1: tensor<64x64xf32, #sparse>) -> tensor<64x64xf32> { |
42 | 44 | %0 = sparse_tensor.convert %arg1 : tensor<64x64xf32, #sparse> to tensor<64x64xf32> |
43 | 45 | return %0 : tensor<64x64xf32> |
44 | 46 | } |
45 | 47 |
|
46 | 48 | // ----- |
47 | 49 |
|
48 | | -// CHECK-LABEL: func.func @spiface_sparse_out( |
| 50 | +// CHECK-LABEL: func.func @sparse_out( |
49 | 51 | // CHECK-SAME: %[[X:.*]]: tensor<64x64xf32>, |
50 | 52 | // CHECK-SAME: %[[A:.*]]: tensor<?xf32>, |
51 | 53 | // CHECK-SAME: %[[B:.*]]: tensor<?xindex>, |
52 | | -// CHECK-SAME: %[[C:.*]]: tensor<?xindex>) -> (tensor<?xf32>, tensor<?xindex>, tensor<?xindex>) attributes {llvm.emit_c_interface} { |
53 | | -// CHECK: %[[F:.*]] = call @sparse_out(%[[X]]) |
| 54 | +// CHECK-SAME: %[[C:.*]]: tensor<?xindex>) -> (tensor<?xf32>, tensor<?xindex>, tensor<?xindex>) { |
| 55 | +// CHECK: %[[F:.*]] = call @_internal_sparse_out(%[[X]]) |
54 | 56 | // CHECK: sparse_tensor.disassemble %[[F]] |
55 | 57 | // CHECK: return |
56 | 58 | // CHECK: } |
| 59 | +// CHECK: func.func private @_internal_sparse_out |
57 | 60 | #sparse = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }> |
58 | | -func.func @sparse_out(%arg0: tensor<64x64xf32>) -> tensor<64x64xf32, #sparse> attributes { llvm.emit_c_interface } { |
| 61 | +func.func @sparse_out(%arg0: tensor<64x64xf32>) -> tensor<64x64xf32, #sparse> { |
59 | 62 | %0 = sparse_tensor.convert %arg0 : tensor<64x64xf32> to tensor<64x64xf32, #sparse> |
60 | 63 | return %0 : tensor<64x64xf32, #sparse> |
61 | 64 | } |
62 | 65 |
|
63 | 66 | // ----- |
64 | 67 |
|
65 | | -// CHECK-LABEL: func.func @spiface_sparse_out2( |
| 68 | +// CHECK-LABEL: func.func @sparse_out2( |
66 | 69 | // CHECK-SAME: %[[X:.*]]: tensor<64x64xf32>, |
67 | 70 | // CHECK-SAME: %[[A:.*]]: tensor<?xf32>, |
68 | 71 | // CHECK-SAME: %[[B:.*]]: tensor<?xindex>, |
69 | | -// CHECK-SAME: %[[C:.*]]: tensor<?xindex>) -> (tensor<64x64xf32>, tensor<?xf32>, tensor<?xindex>, tensor<?xindex>) attributes {llvm.emit_c_interface} { |
70 | | -// CHECK: %[[F:.*]]:2 = call @sparse_out2(%[[X]]) |
| 72 | +// CHECK-SAME: %[[C:.*]]: tensor<?xindex>) -> (tensor<64x64xf32>, tensor<?xf32>, tensor<?xindex>, tensor<?xindex>) { |
| 73 | +// CHECK: %[[F:.*]]:2 = call @_internal_sparse_out2(%[[X]]) |
71 | 74 | // CHECK: sparse_tensor.disassemble %[[F]]#1 |
72 | 75 | // CHECK: return %[[F]]#0 |
73 | 76 | // CHECK: } |
| 77 | +// CHECK: func.func private @_internal_sparse_out2 |
74 | 78 | #sparse = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }> |
75 | | -func.func @sparse_out2(%arg0: tensor<64x64xf32>) -> (tensor<64x64xf32>, tensor<64x64xf32, #sparse>) attributes { llvm.emit_c_interface } { |
| 79 | +func.func @sparse_out2(%arg0: tensor<64x64xf32>) -> (tensor<64x64xf32>, tensor<64x64xf32, #sparse>) { |
76 | 80 | %0 = sparse_tensor.convert %arg0 : tensor<64x64xf32> to tensor<64x64xf32, #sparse> |
77 | 81 | return %arg0, %0 : tensor<64x64xf32>, tensor<64x64xf32, #sparse> |
78 | 82 | } |
79 | 83 |
|
80 | 84 | // ----- |
81 | 85 |
|
82 | | -// CHECK-LABEL: func.func @spiface_sparse_inout( |
| 86 | +// CHECK-LABEL: func.func @sparse_inout( |
83 | 87 | // CHECK-SAME: %[[A:.*0]]: tensor<?xf32>, |
84 | 88 | // CHECK-SAME: %[[B:.*1]]: tensor<?xindex>, |
85 | 89 | // CHECK-SAME: %[[C:.*2]]: tensor<?xindex>, |
86 | 90 | // CHECK-SAME: %[[D:.*3]]: tensor<?xf32>, |
87 | 91 | // CHECK-SAME: %[[E:.*4]]: tensor<?xindex>, |
88 | | -// CHECK-SAME: %[[F:.*5]]: tensor<?xindex>) -> (tensor<?xf32>, tensor<?xindex>, tensor<?xindex>) attributes {llvm.emit_c_interface} { |
| 92 | +// CHECK-SAME: %[[F:.*5]]: tensor<?xindex>) -> (tensor<?xf32>, tensor<?xindex>, tensor<?xindex>) { |
89 | 93 | // CHECK: %[[I:.*]] = sparse_tensor.assemble %[[A]], %[[B]], %[[C]] |
90 | | -// CHECK: %[[F:.*]] = call @sparse_inout(%[[I]]) |
| 94 | +// CHECK: %[[F:.*]] = call @_internal_sparse_inout(%[[I]]) |
91 | 95 | // CHECK: sparse_tensor.disassemble %[[F]] |
92 | 96 | // CHECK: return |
93 | 97 | // CHECK: } |
| 98 | +// CHECK: func.func private @_internal_sparse_inout |
94 | 99 | #sparse = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }> |
95 | | -func.func @sparse_inout(%arg0: tensor<64x64xf32, #sparse>) -> tensor<64x64xf32, #sparse> attributes { llvm.emit_c_interface } { |
| 100 | +func.func @sparse_inout(%arg0: tensor<64x64xf32, #sparse>) -> tensor<64x64xf32, #sparse> { |
96 | 101 | return %arg0 : tensor<64x64xf32, #sparse> |
97 | 102 | } |
0 commit comments