fix: use float base in pow to avoid Inductor dtype mismatch#627
Merged
kylesayrs merged 3 commits intovllm-project:mainfrom Mar 12, 2026
Merged
fix: use float base in pow to avoid Inductor dtype mismatch#627kylesayrs merged 3 commits intovllm-project:mainfrom
kylesayrs merged 3 commits intovllm-project:mainfrom
Conversation
Bias92
added a commit
to Bias92/llm-compressor
that referenced
this pull request
Mar 11, 2026
compile inner _compute_candidate_error via torch.compile(dynamic=True). early stopping preserved in outer loop. compile flag added as oneshot arg. requires: vllm-project/compressed-tensors#627 related: pytorch/pytorch#177131
Bias92
added a commit
to Bias92/llm-compressor
that referenced
this pull request
Mar 11, 2026
compile inner _compute_candidate_error via torch.compile(dynamic=True). early stopping preserved in outer loop. compile flag added as oneshot arg. requires: vllm-project/compressed-tensors#627 related: pytorch/pytorch#177131 Signed-off-by: Jaewoo Kim <pewpewplay315@gmail.com>
Signed-off-by: Bias92 <gongnobi@gmail.com>
Signed-off-by: Bias92 <gongnobi@gmail.com>
57a0dc4 to
f6e0dfb
Compare
brian-dellabetta
approved these changes
Mar 11, 2026
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.
when torch.compile with capture_scalar_outputs=True traces through calculate_range, the integer base in 2**num_bits causes num_bits to enter the Inductor graph as a symbolic int64. Inductor then emits libdevice.pow(float32, int64) in Triton codegen which fails on the type mismatch.
changing to 2.0** makes Python produce a float result directly so the Inductor graph stays type-consistent and Triton compiles cleanly.
related pytorch issue: pytorch/pytorch#177131
needed by: vllm-project/llm-compressor#2384