Commit 4d0a951
committed
Use entry points to locate backends
Use entry points to locate Triton backends instead of iterating over
the `triton.backends` package directory. This fixes support for
nontrivial install layouts, particularly editable installs made using
`package_dir`. Now `setup.py` keeps record of all installed backends
in entry points, and `triton.backends` uses them to locate and load
the backends. This also technically permits installing third-party
backends without altering the Triton installation, by adding additional
entry points.1 parent 8afcacd commit 4d0a951
2 files changed
+16
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| 601 | + | |
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
| |||
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
641 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
642 | 646 | | |
643 | 647 | | |
644 | 648 | | |
| |||
0 commit comments