Skip to content

Remove triton submodule and add triton-hash.txt to track the triton commit ID#344

Merged
lechenyu merged 7 commits intomicrosoft:mainfrom
lechenyu:remove-triton-submodule
Aug 29, 2025
Merged

Remove triton submodule and add triton-hash.txt to track the triton commit ID#344
lechenyu merged 7 commits intomicrosoft:mainfrom
lechenyu:remove-triton-submodule

Conversation

@lechenyu
Copy link
Copy Markdown
Contributor

@lechenyu lechenyu commented Aug 26, 2025

This PR removes the Triton submodule and replaces it with a hash file (triton-hash.txt) to track the Triton version. This change provides greater flexibility in the Triton versions that triton-shared can be built with. All relevant files have been updated accordingly.

After this PR is landed, the installation steps will be

export TRITON_PLUGIN_DIRS=$(pwd)/triton_shared

git clone https://github.com/microsoft/triton-shared.git triton_shared
git clone https://github.com/triton-lang/triton.git
cd triton && git checkout $(cat ../triton_shared/triton-hash.txt)
...
// follow the same steps as before to build Triton

@red1bluelost
Copy link
Copy Markdown
Contributor

Now that we are cloning the Triton repo, should we add the folder to the gitignore here?

@red1bluelost
Copy link
Copy Markdown
Contributor

Does this change require any edits to the nightly pipeline? Nightly pipeline pulls down Triton main.

(I am working on fixing the nightly pipeline at the moment which has separate issues when integrating with Triton main right now).

Copy link
Copy Markdown
Contributor

@red1bluelost red1bluelost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good to me. Just some comments. I am adding Meta and Qualcomm folks to the review.

Comment thread triton-san/script/install_triton_san.sh Outdated
Comment thread .github/workflows/test-plugin.yml
@red1bluelost
Copy link
Copy Markdown
Contributor

Seems I cannot add non-Microsoft reviewers so just tagging folks in this comment. @haishanzzzz, @mitekoth, @zhaoshiz

@red1bluelost
Copy link
Copy Markdown
Contributor

@lechenyu Right now we have three symlinks into Triton: 'python/examples/test_core.py', 'python/examples/test_annotations.py', and '.clang-format'. For the clang-format, I'd be fine with having a copy in our repo. I doubt it would change in a way we care about. For the two test files, we need a way to import them into examples so they can be tested.

@lechenyu
Copy link
Copy Markdown
Contributor Author

@lechenyu Right now we have three symlinks into Triton: 'python/examples/test_core.py', 'python/examples/test_annotations.py', and '.clang-format'. For the clang-format, I'd be fine with having a copy in our repo. I doubt it would change in a way we care about. For the two test files, we need a way to import them into examples so they can be tested.

Apologies for missing those symlinks. I was thinking it might be helpful to set up a top-level CMakeLists.txt to automate the build process. Since we're trying to remove the Triton submodule, there are now several additional steps that users need to be aware of, such as checking out Triton manually and making the two Python test visible to triton-shared.

@lechenyu
Copy link
Copy Markdown
Contributor Author

I’ve updated the CMakeLists.txt to automatically generate the three symlinks. These symlinks are now included in .gitignore.

Comment thread CMakeLists.txt
Comment thread CMakeLists.txt Outdated
Comment thread .gitignore Outdated
@lechenyu lechenyu merged commit 447ffe3 into microsoft:main Aug 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants