-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUILD] Support building out of tree plugins (#3007)
This PR adds support for building out of tree plugins with triton. External plugins can provide an environment variable before invoking `python setup.py` to let triton know where to find the backends. + `TRITON_PLUGIN_DIRS`: semicolon-separated list of directories containing the plugins. The last components of the paths will be used as plugin names. For instance, if we have `triton_shared` under `/home/user/github/triton_shared`, to build `triton_shared` with `triton`, we can do: ``` export TRITON_PLUGIN_DIRS="/home/user/github/triton_shared" python3 setup.py build ``` This also assumes that the external backends have moved over to the new external backend architecture; they have to expose a `backend` folder under their root directory. With this change, all external backends will still be copied to `triton/runtime` and be used like: ```python import triton from triton.backends.triton_shared.driver import CPUDriver triton.runtime.driver.set_active(CPUDriver()) ```
- Loading branch information
1 parent
91fb6ea
commit 7acb4ff
Showing
2 changed files
with
76 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters