fix overlap scheduler in AD - #79
Merged
Merged
Conversation
Signed-off-by: Suyog Gupta <suyogg@nvidia.com>
Signed-off-by: Suyog Gupta <suyogg@nvidia.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the overlap scheduler in the AD executor, updates the default to enable the scheduler by default, and refactors sequence flattening in the attention interface.
- Extend
ADExecutorto acceptnew_tokensfor overlap scheduling and update logging withmax_beam_width. - Change
disable_overlap_schedulerdefault toFalseinAutoDeployConfig. - Refactor
attention_interfaceto rebuildposition_idsandinput_idsusing Python list comprehensions.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py | Added new_tokens parameter, updated logging and self.max_beam_width. |
| tensorrt_llm/_torch/auto_deploy/llm_args.py | Changed default of disable_overlap_scheduler to False, removed flags. |
| tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py | Switched tensor concat logic to Python list builds for flattening. |
Comments suppressed due to low confidence (3)
tensorrt_llm/_torch/auto_deploy/llm_args.py:87
- Changing the default of
disable_overlap_schedulertoFalsemay alter existing behaviors. Consider documenting this breaking change in release notes or migration instructions.
default=False,
tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py:142
- The new
new_tokenshandling logic in_prepare_inputsintroduces new code paths that should be covered by unit tests, including both enabled and disabled overlap scheduler scenarios.
)
tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py:240
- The variable
new_tokens_deviceis not defined in this scope, which will raise a NameError at runtime. You should pass the correct object or retrievenew_tokensfrom an available reference.
new_tokens = getattr(new_tokens_device, "new_tokens", None)
lucaslie
reviewed
Jul 14, 2025
Signed-off-by: Suyog Gupta <suyogg@nvidia.com>
Signed-off-by: Suyog Gupta <suyogg@nvidia.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
lucaslie
approved these changes
Jul 14, 2025
lucaslie
enabled auto-merge (squash)
July 14, 2025 23:58
lucaslie
disabled auto-merge
July 15, 2025 01:04
lucaslie
enabled auto-merge (squash)
July 15, 2025 01:04
lucaslie
disabled auto-merge
July 15, 2025 01:06
lucaslie
added a commit
that referenced
this pull request
Jul 18, 2025
* fix overlap scheduler in AD Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * cleanups Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * fix nest sequences Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * nits * avoid hardcoding max beam width Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * avoid hardcoding max beam width Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * clean logic and max_beam_width arg Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com> --------- Signed-off-by: Suyog Gupta <suyogg@nvidia.com> Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com> Co-authored-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
lucaslie
added a commit
that referenced
this pull request
Jul 21, 2025
* fix overlap scheduler in AD Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * cleanups Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * fix nest sequences Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * nits * avoid hardcoding max beam width Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * avoid hardcoding max beam width Signed-off-by: Suyog Gupta <suyogg@nvidia.com> * clean logic and max_beam_width arg Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com> --------- Signed-off-by: Suyog Gupta <suyogg@nvidia.com> Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com> Co-authored-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
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.
Add support for overlap scheduler in AD. Fixes issue NVIDIA#4364