-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow third-party backends to add submodules to triton.language.extra
#4503
Allow third-party backends to add submodules to triton.language.extra
#4503
Conversation
The tests should pass now. |
Tests passed but I forgot to re-run pre-commit, I've run it now. |
For some reason there were more pre-commit changes after the running it a second time. Looks like everything is passing pre-commit now. |
07b17df
to
304f579
Compare
Rebased |
304f579
to
962620d
Compare
Rebased |
Would #4539 solve your problem? |
Yes, that solves the issue of dispatching to third-party libdevice functions 👍. With the current third-party backend mechanism, it's possible for a backend to be entirely out of tree. The only caveat is that without in-tree changes you can only get python files into |
triton.language.extra
962620d
to
3ae707b
Compare
Sorry for the delay. Do you still want to push this? The changes seem reasonable. Could you resolve conflicts if you still need this PR |
3ae707b
to
aef71cc
Compare
Add an optional language directory to backends. The contents of the directory is added to the `triton.language.extra` namespace when the wheel is built. Change the existing `triton.language.extra.cuda` and `triton.language.extra.hip` modules to use the new mechanism.
aef71cc
to
03aa528
Compare
Hi, no worries about the delay. Yes I'm still keen to push this. I've rebased the changes onto main. |
…a` (triton-lang#4503) Add an optional language directory to backends. The contents of the directory is added to `triton.language.extra` when the wheel is built. Update the existing `triton.language.extra.cuda` and `triton.language.extra.hip` modules to use the new mechanism. The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace `[ ]` with `[x]` to indicate you have done them. - [x] I am not making a trivial change, such as fixing a typo in a comment. - [x] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`. - Select one of the following. - [ ] I have added tests. - `/test` for `lit` tests - `/unittest` for C++ tests - `/python/test` for end-to-end tests - [x] This PR does not need a test because `It is already tested by python/test/unit/language/test_core.py::test_math_extern`. - Select one of the following. - [x] I have not added any `lit` tests. - [ ] The `lit` tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.)
…a` (triton-lang#4503) Add an optional language directory to backends. The contents of the directory is added to `triton.language.extra` when the wheel is built. Update the existing `triton.language.extra.cuda` and `triton.language.extra.hip` modules to use the new mechanism. The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace `[ ]` with `[x]` to indicate you have done them. - [x] I am not making a trivial change, such as fixing a typo in a comment. - [x] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`. - Select one of the following. - [ ] I have added tests. - `/test` for `lit` tests - `/unittest` for C++ tests - `/python/test` for end-to-end tests - [x] This PR does not need a test because `It is already tested by python/test/unit/language/test_core.py::test_math_extern`. - Select one of the following. - [x] I have not added any `lit` tests. - [ ] The `lit` tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.)
…a` (triton-lang#4503) Add an optional language directory to backends. The contents of the directory is added to `triton.language.extra` when the wheel is built. Update the existing `triton.language.extra.cuda` and `triton.language.extra.hip` modules to use the new mechanism. The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace `[ ]` with `[x]` to indicate you have done them. - [x] I am not making a trivial change, such as fixing a typo in a comment. - [x] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`. - Select one of the following. - [ ] I have added tests. - `/test` for `lit` tests - `/unittest` for C++ tests - `/python/test` for end-to-end tests - [x] This PR does not need a test because `It is already tested by python/test/unit/language/test_core.py::test_math_extern`. - Select one of the following. - [x] I have not added any `lit` tests. - [ ] The `lit` tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.)
…a` (triton-lang#4503) Add an optional language directory to backends. The contents of the directory is added to `triton.language.extra` when the wheel is built. Update the existing `triton.language.extra.cuda` and `triton.language.extra.hip` modules to use the new mechanism. The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace `[ ]` with `[x]` to indicate you have done them. - [x] I am not making a trivial change, such as fixing a typo in a comment. - [x] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`. - Select one of the following. - [ ] I have added tests. - `/test` for `lit` tests - `/unittest` for C++ tests - `/python/test` for end-to-end tests - [x] This PR does not need a test because `It is already tested by python/test/unit/language/test_core.py::test_math_extern`. - Select one of the following. - [x] I have not added any `lit` tests. - [ ] The `lit` tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.)
Add an optional language directory to backends. The contents of the directory is added to
triton.language.extra
when the wheel is built.Update the existing
triton.language.extra.cuda
andtriton.language.extra.hip
modules to use the new mechanism.The core Triton is a small number of people, and we receive many PRs (thank
you!). To help us review your code more quickly, if you are a new
contributor (less than 3 PRs merged) we ask that you complete the following
tasks and include the filled-out checklist in your PR description.
Complete the following tasks before sending your PR, and replace
[ ]
with[x]
to indicate you have done them.I am not making a trivial change, such as fixing a typo in a comment.
I have written a PR description following these
rules.
I have run
pre-commit run --from-ref origin/main --to-ref HEAD
.Select one of the following.
/test
forlit
tests/unittest
for C++ tests/python/test
for end-to-end testsIt is already tested by python/test/unit/language/test_core.py::test_math_extern
.Select one of the following.
lit
tests.lit
tests I have added follow these best practices,including the "tests should be minimal" section. (Usually running Python code
and using the instructions it generates is not minimal.)