Skip to content
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

[Bug]: Triton shared does not build "out of the box" #91

Closed
aaronsm opened this issue Jan 23, 2024 · 4 comments
Closed

[Bug]: Triton shared does not build "out of the box" #91

aaronsm opened this issue Jan 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@aaronsm
Copy link
Contributor

aaronsm commented Jan 23, 2024

The instructions for building Triton shared in the README are wrong --

"This repo doesn't build by itself and must instead by built from within a Triton repo where it is included as a submodule. To add the shared middle-layer in your Triton build do export TRITON_CODEGEN_TRITON_SHARED=1 before invoking your build."

To build Triton shared you need to do two things --

  1. Third party backends are commented out in triton/python/setup.py and will not be built unless lines 312-315
    are uncommented.

  2. The environment variable TRITON_CODEGEN_TRITON_SHARED is used by get_codegen_backends() in setup.py to determine the directory name for the plugin. The environment variable uses an underscore, "triton_shared", while the git repo uses a dash, "triton-shared". The directory must be renamed to "triton_shared" or it will not be built.

@aaronsm aaronsm added the bug Something isn't working label Jan 23, 2024
@nhat-nguyen
Copy link
Collaborator

This issue can probably be merged with #76. Since early December last year, triton refactored 3rd party plugin integrations. The triton commit that will work with what we have is 56c284cf7e39f249cdf1d8d5dba7892deb0286d6. We used to be a submodule of triton and got removed as part of that refactor. With the old build step, you won't have this issue since triton-shared is already named as triton_shared under triton/third_party.

All of this will get resolved once these two PRs are merged:

@zhaoshiz
Copy link

* [Update CPU backend to work with latest triton #87](https://github.com/microsoft/triton-shared/pull/87)

* [Support building out of tree plugins openai/triton#3007](https://github.com/openai/triton/pull/3007)

Are we expecting both to be merged soon?

@nhat-nguyen
Copy link
Collaborator

* [Update CPU backend to work with latest triton #87](https://github.com/microsoft/triton-shared/pull/87)

* [Support building out of tree plugins openai/triton#3007](https://github.com/openai/triton/pull/3007)

Are we expecting both to be merged soon?

@zhaoshiz The PR to support building 3rd party plugin hasn't been merged yet. But I have gone ahead and use a temporary branch as the current triton submodule to unblock the project for now. The reference CPU backend has been merged. Everything is back to green now. You can take a look at the new README for instructions on how to build. The steps might change slightly in the future depending on the direction we decide to go in the ongoing PR. Thank you!

@nhat-nguyen
Copy link
Collaborator

Fixed by #87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants