-
Notifications
You must be signed in to change notification settings - Fork 2k
Use symlinks for external plugins to fix TRITON_PLUGIN_DIRS #6627
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
Conversation
Disable the new backend installing logic for external plugins, since `package_dir` does not accept absolute paths. Instead, use a hybrid approach where in-tree backends are installed using the new logic and external backends are symlinked. This implies that source distributions cannot be created when using external plugins. Fixes triton-lang#6612
One note: I've noticed a potential bug in the logic (that was there before my first change):
Note that files like |
Seeing the same error as before with this change. I think because even though the symlinks are setup for the external plugins their |
They shouldn't, unless I really messed something up: Lines 599 to 601 in f5c252c
Did you do a full clean of the build tree? Ideally |
Ah, sorry - you're right. Successful build after that 🎉 However non .py files from the backend didn't get installed. Does the manifest need to be tweaked ? |
Sorry — just made a dummy backend and reproduced the problem. I think the problem is that |
@BabakkGraphcore, could you try now? |
No change. Tested with...
The specific file that isn't being copied is a |
In |
Ah, sorry, now I understand what you meant by the manifest. I forgot that it affects installing data files. |
thanks @mgorny that looks to be working now, build + tests passing 🎉 going to try one more test and get it a passing CI workflow with it |
Took a while 😅 but all good, thanks for the fix |
…ang#6627) Disable the new backend installing logic for external plugins, since `package_dir` does not accept absolute paths. Instead, use a hybrid approach where in-tree backends are installed using the new logic and external backends are symlinked. This implies that source distributions cannot be created when using external plugins. Fixes triton-lang#6612 ------ <!--- 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. --> # New contributor declaration - [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 touches build system only. - 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.)
Disable the new backend installing logic for external plugins, since
package_dir
does not accept absolute paths. Instead, use a hybrid approach where in-tree backends are installed using the new logic and external backends are symlinked. This implies that source distributions cannot be created when using external plugins.Fixes #6612
New contributor declaration
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 testsSelect 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.)