Commit 71ee6b1
hyun gyu kim
[TIR][Schedule] Support multiple epilogue blocks in FuseReductionEpilogue
- Add CheckBufferStillUsed helper function to check if reduction buffer
is still referenced by other blocks after fusion
- Only remove intermediate temp buffer if no other blocks reference it
- Add test case for multiple epilogue blocks scenario where one epilogue
is fused while another still uses the intermediate buffer
- This addresses the case where multiple epilogue blocks use the same
reduction output, ensuring the temp buffer is preserved when needed
Related issue: https://discuss.tvm.apache.org/t/...1 parent 0fc40e7 commit 71ee6b1
File tree
2 files changed
+302
-167
lines changed- src/tir/schedule/primitive
- tests/python/tir-schedule
2 files changed
+302
-167
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
1239 | 1315 | | |
1240 | 1316 | | |
1241 | 1317 | | |
| |||
1247 | 1323 | | |
1248 | 1324 | | |
1249 | 1325 | | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1256 | 1337 | | |
| 1338 | + | |
1257 | 1339 | | |
1258 | | - | |
1259 | 1340 | | |
1260 | 1341 | | |
1261 | 1342 | | |
| |||
0 commit comments