Commit 45a2a40
authored
[Relax][PyTorch] Add decomposed operator support for Binary (#18458)
## Related Issue
- #18401
## Why
- When `run_ep_decomposition=True` is enabled, PyTorch decomposes binary
operators into lower-level operations and some of them are not
supported, which cause error
## How
- Added support for `bitwise_and.Tensor`, `bitwise_and.Scalar`,
`bitwise_xor.Tensor` and `bitwise_xor.Scalar`
- Updated `test_binary` to use `run_ep_decomposition=True`1 parent b6ac072 commit 45a2a40
File tree
2 files changed
+51
-8
lines changed- python/tvm/relax/frontend/torch
- tests/python/relax
2 files changed
+51
-8
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
| 901 | + | |
| 902 | + | |
901 | 903 | | |
902 | 904 | | |
| 905 | + | |
| 906 | + | |
903 | 907 | | |
904 | 908 | | |
905 | 909 | | |
| |||
929 | 933 | | |
930 | 934 | | |
931 | 935 | | |
| 936 | + | |
| 937 | + | |
932 | 938 | | |
933 | 939 | | |
934 | 940 | | |
| |||
Lines changed: 45 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
1294 | 1309 | | |
1295 | 1310 | | |
1296 | 1311 | | |
| |||
1311 | 1326 | | |
1312 | 1327 | | |
1313 | 1328 | | |
1314 | | - | |
1315 | | - | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
1316 | 1353 | | |
1317 | 1354 | | |
1318 | 1355 | | |
| |||
1374 | 1411 | | |
1375 | 1412 | | |
1376 | 1413 | | |
1377 | | - | |
1378 | | - | |
| 1414 | + | |
| 1415 | + | |
1379 | 1416 | | |
1380 | 1417 | | |
1381 | 1418 | | |
| |||
1403 | 1440 | | |
1404 | 1441 | | |
1405 | 1442 | | |
1406 | | - | |
| 1443 | + | |
1407 | 1444 | | |
1408 | 1445 | | |
1409 | 1446 | | |
| |||
1423 | 1460 | | |
1424 | 1461 | | |
1425 | 1462 | | |
1426 | | - | |
| 1463 | + | |
1427 | 1464 | | |
1428 | 1465 | | |
1429 | 1466 | | |
| |||
1458 | 1495 | | |
1459 | 1496 | | |
1460 | 1497 | | |
1461 | | - | |
1462 | | - | |
| 1498 | + | |
| 1499 | + | |
1463 | 1500 | | |
1464 | 1501 | | |
1465 | 1502 | | |
| |||
0 commit comments