[relax] Fix tree attention for Qwen2-1.5 models#17700
Merged
MasterJH5574 merged 1 commit intoapache:mainfrom Mar 3, 2025
Merged
[relax] Fix tree attention for Qwen2-1.5 models#17700MasterJH5574 merged 1 commit intoapache:mainfrom
MasterJH5574 merged 1 commit intoapache:mainfrom
Conversation
Fix the compilation error for Qwen2-1.5 models in the tree attention implementation for vulkan backend.
Member
Author
|
One additional note: this PR provides an immediate fix for the issue, but it doesn't address the underlying problem - the simplifier can potentially cause integer overflow. For illustration, here's a minimal reproducible example: import tvm
x = tvm.tir.Var("x", "int32")
# Creating an expression that triggers integer overflow during simplification
expr = (tvm.tir.Div(x + 1073741826, 3) - 357913942) * 1536
ana = tvm.arith.Analyzer()
print(ana.simplify(expr))cc @tqchen |
vinx13
approved these changes
Mar 3, 2025
MasterJH5574
approved these changes
Mar 3, 2025
Contributor
MasterJH5574
left a comment
There was a problem hiding this comment.
Thanks for the fix!
ShiboXing
pushed a commit
to ShiboXing/tvm
that referenced
this pull request
Aug 10, 2025
Fix the compilation error for Qwen2-1.5 models in the tree attention implementation for vulkan backend.
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.
Fix the compilation error(mlc-ai/mlc-llm#3143) for Qwen2-1.5 models in the tree attention implementation for vulkan backend.
cc @spectrometerHBH @vinx13