Commit 48adf3c
committed
[TVMScript] Encourage using T.Buffer directly
Previously there are two equivalent ways of declaring a buffer in
TVMScript:
```python
buffer = T.buffer_decl(...)
buffer = T.Buffer(...)
```
The two approaches are aliases to each other and are essentially the
same in implementation. Therefore, this PR encourages to use `T.Buffer`
as the recommended approach as it's a bit shorter. Meanwhile,
`T.buffer_decl` will continue to be valid in TVMScript, but a
deprecation warning will be emitted if its used.1 parent 82cf9f7 commit 48adf3c
File tree
5 files changed
+27
-19
lines changed- python/tvm/script
- ir_builder/tir
- parser/tir
- src/script/ir_builder/tir
- tests/python/unittest
5 files changed
+27
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
| |||
1177 | 1182 | | |
1178 | 1183 | | |
1179 | 1184 | | |
1180 | | - | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1181 | 1190 | | |
1182 | 1191 | | |
1183 | 1192 | | |
| |||
1211 | 1220 | | |
1212 | 1221 | | |
1213 | 1222 | | |
1214 | | - | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
1215 | 1227 | | |
1216 | 1228 | | |
1217 | 1229 | | |
| |||
1432 | 1444 | | |
1433 | 1445 | | |
1434 | 1446 | | |
1435 | | - | |
| 1447 | + | |
1436 | 1448 | | |
1437 | 1449 | | |
1438 | 1450 | | |
| |||
1815 | 1827 | | |
1816 | 1828 | | |
1817 | 1829 | | |
| 1830 | + | |
1818 | 1831 | | |
1819 | 1832 | | |
1820 | 1833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
| |||
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | | - | |
| 67 | + | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
| |||
89 | 87 | | |
90 | 88 | | |
91 | 89 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 90 | + | |
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
597 | | - | |
| 596 | + | |
598 | 597 | | |
599 | 598 | | |
600 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
0 commit comments