Skip to content

fix overlap scheduler in AD - #79

Merged
lucaslie merged 11 commits into
feat/ad-2025-07-07from
user/sg/overlap-sched
Jul 15, 2025
Merged

fix overlap scheduler in AD#79
lucaslie merged 11 commits into
feat/ad-2025-07-07from
user/sg/overlap-sched

Conversation

@suyoggupta

@suyoggupta suyoggupta commented Jul 9, 2025

Copy link
Copy Markdown

Add support for overlap scheduler in AD. Fixes issue NVIDIA#4364

Signed-off-by: Suyog Gupta <suyogg@nvidia.com>
Copilot AI review requested due to automatic review settings July 9, 2025 23:50

This comment was marked as outdated.

Signed-off-by: Suyog Gupta <suyogg@nvidia.com>
Signed-off-by: Suyog Gupta <suyogg@nvidia.com>
Signed-off-by: Suyog Gupta <suyogg@nvidia.com>
@suyoggupta
suyoggupta requested review from Copilot and lucaslie July 11, 2025 22:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ADExecutor to accept new_tokens for overlap scheduling and update logging with max_beam_width.
  • Change disable_overlap_scheduler default to False in AutoDeployConfig.
  • Refactor attention_interface to rebuild position_ids and input_ids using 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_scheduler to False may 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_tokens handling logic in _prepare_inputs introduces 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_device is not defined in this scope, which will raise a NameError at runtime. You should pass the correct object or retrieve new_tokens from an available reference.
        new_tokens = getattr(new_tokens_device, "new_tokens", None)

Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py
Comment thread tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/llm_args.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
suyoggupta and others added 5 commits July 14, 2025 12:42
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
lucaslie enabled auto-merge (squash) July 14, 2025 23:58
@lucaslie
lucaslie disabled auto-merge July 15, 2025 01:04
@lucaslie
lucaslie enabled auto-merge (squash) July 15, 2025 01:04
@lucaslie
lucaslie disabled auto-merge July 15, 2025 01:06
@lucaslie
lucaslie merged commit e84b319 into feat/ad-2025-07-07 Jul 15, 2025
1 check passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants