Repository navigation
Conversation
This branch has not been deployed
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.
Fixes #5037.
Dynamic slice bound arithmetic can hide output dimensions that export already knows are constant. This makes attention reject matching K/V shapes after a sliced table is broadcast into K, and makes
narrow(1, x.shape[1] - 12, 12).split([8, 4], 1)fail because TensorRT sees the split axis as dynamic instead of 12.Pass the slice output's constant dimensions from FakeTensor metadata into the TensorRT slice size vector. Keep the existing runtime size calculations for symbolic dimensions and when export metadata is unavailable. Concrete ShapeProp examples are not used to specialize shapes, and internal converter calls do not inherit the enclosing FX node's output shape.
The regressions cover the attention repro with both zero and nonzero table scales, the fixed-length narrow/split with static and dynamic batch sizes, and an output extent that must continue changing at runtime. They require full compilation and compare actual GPU outputs at several input sizes, including profile endpoints. The existing split assertion and slice clamping remain in place.
Also make the existing
_is_bf16()predicate explicitly returnboolto resolve a pre-existing mypyno-any-returnerror in the touched converter file.Validation: