Relax triton pin from ==3.5.0 to >=3.4.0 - #52
Closed
cennn wants to merge 1 commit into
Closed
Conversation
The hard pin on triton==3.5.0 causes issues in NGC-based Docker images where pytorch-triton 3.4.0 is bundled with PyTorch. Installing triton==3.5.0 shadows the bundled version, leading to different Triton compiler backends (backend_hash) which produces numerically different compiled kernels — breaking bit-exact reproducibility between images that use different triton versions. Since MagiCompiler's pyproject.toml declares no triton runtime dependency, this requirements.txt is for development only. Relaxing to >=3.4.0 allows the environment's existing triton to be reused.
Collaborator
Author
|
Closing: the fix belongs in downstream Dockerfiles (Athena & MAGI-2) that strip the triton pin before installing, rather than relaxing it in MagiCompiler itself. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
triton==3.5.0totriton>=3.4.0inrequirements.txtpytorch-triton(3.4.0) when installing in PyTorch NGC containers, causing different Tritonbackend_hashvalues and numerically different compiled kernels — breaking compile-mode bit-exact reproducibility across imagespyproject.tomldeclares no triton runtime dependency, this file is for development use only; relaxing the constraint lets the environment's existing triton be reusedContext
When MAGI-2's Dockerfile runs
pip install -r requirements.txtbefore installing MagiCompiler,triton==3.5.0overwrites the NGC base image'spytorch-triton 3.4.0. This produces a differentbackend_hashin Inductor-generated Triton kernels, leading to max ~5e-4 numerical differences in VAE encode that cascade to max ~1.78 divergence after DiT processing (chaotic amplification). The issue is absent in eager mode and only manifests intorch.compilemode.Test plan