Skip to content

[AutoDeploy] more robust handling of attention interface and input nodes - #4369

Closed
lucaslie wants to merge 13 commits into
NVIDIA:mainfrom
nv-auto-deploy:ll/attn_if_updated
Closed

[AutoDeploy] more robust handling of attention interface and input nodes#4369
lucaslie wants to merge 13 commits into
NVIDIA:mainfrom
nv-auto-deploy:ll/attn_if_updated

Conversation

@lucaslie

@lucaslie lucaslie commented May 15, 2025

Copy link
Copy Markdown
Contributor

This PR improves handling of our inputs that are provided by the cache interface:

  • better switch between original two inputs and full inputs after cache metadata
  • handling of case when both MLA and MHA layers are present and hence inputs should only be added once
  • simplification of attention interface

Test Coverage

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

Details

run [--disable-fail-fast --skip-test --stage-list "A10-1, xxx" --gpu-type "A30, H100_PCIe" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-[Post-Merge]-1, xxx"]

Launch build/test pipelines. All previously running jobs will be killed.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests. Will also run L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-[Post-Merge]-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-[Post-Merge]-1, xxx".

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@lucaslie

Copy link
Copy Markdown
Contributor Author

/bot run

@lucaslie lucaslie self-assigned this May 15, 2025
@lucaslie lucaslie moved this from Backlog to In review in AutoDeploy Board May 15, 2025
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5411 [ run ] triggered by Bot

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@lucaslie lucaslie added the AutoDeploy <NV> AutoDeploy Backend label May 15, 2025
Comment thread tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py Outdated
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5411 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #3948 completed with status: 'FAILURE'

@lucaslie
lucaslie force-pushed the ll/attn_if_updated branch from 6d1c04b to 6518887 Compare May 16, 2025 15:29
@lucaslie

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5523 [ run ] triggered by Bot

@lucaslie
lucaslie enabled auto-merge (squash) May 16, 2025 16:36
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5523 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #4025 completed with status: 'FAILURE'

@lucaslie
lucaslie force-pushed the ll/attn_if_updated branch from 6518887 to 396c9cf Compare May 16, 2025 19:47
@lucaslie

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5536 [ run ] triggered by Bot

@lucaslie
lucaslie force-pushed the ll/attn_if_updated branch from 396c9cf to b921aca Compare May 16, 2025 22:17
@lucaslie

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5541 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5536 [ run ] completed with state ABORTED
/LLM/main/L0_MergeRequest_PR pipeline #4037 completed with status: 'FAILURE'

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5541 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #4042 completed with status: 'FAILURE'

@lucaslie
lucaslie force-pushed the ll/attn_if_updated branch from b921aca to 706021f Compare May 19, 2025 17:45
@lucaslie

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5759 [ run ] triggered by Bot

@lucaslie
lucaslie disabled auto-merge May 19, 2025 23:17
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #5759 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #4213 completed with status: 'FAILURE'

lucaslie and others added 13 commits May 19, 2025 21:00
* [AutoDeploy] HF factory improvements



* improve monkey-patches and add unit tests



---------

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
* [AutoDeploy] bmm sharder

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>

* a few more subtle MP clean-ups

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>

---------

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>
* DS support related fixes

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

* DS related changes

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

* Quick fix for dashboard runs

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

* Quick fix for dashboard runs

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

* Reduce number of layers in integration test

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

* formatting

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

---------

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
…ue (#19)

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Includes #17 , #18, #21 , #23

* move Phi PR for sprint

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>

* remove Phi3 patch and unfuse_weight transformation

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>

* update Phi3/4 patches

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>

* minor

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>

* minor

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>

* Update the position id to int64

Signed-off-by: Chenghao Zhang <211069071+nvchenghaoz@users.noreply.github.com>

* Add support for handling aliased parameters

Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>

* update tests

Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>

* lint

Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>

* lint

Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>

* removed load state dict with assign context manager

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

* formatting fix

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

* Removed related unit tests

Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>

* [AutoDeploy] correctly identifying how to load HF checkpoint weights

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>

* [AutoDeploy] correctly load sharded weights

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>

* skip sharding if num_users>1

Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>

---------

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>
Signed-off-by: Chenghao Zhang <211069071+nvchenghaoz@users.noreply.github.com>
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Co-authored-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>
Co-authored-by: Chenghao Zhang <211069071+nvchenghaoz@users.noreply.github.com>
Co-authored-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>
Co-authored-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
* add phi3.5 patch

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>

* revert gemm fusion change

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>

* update README

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>

---------

Signed-off-by: Ubuntu <201670829+Fridah-nv@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
@lucaslie

Copy link
Copy Markdown
Contributor Author

will be merged via nv-auto-deploy#31

@lucaslie lucaslie closed this May 23, 2025
@github-project-automation github-project-automation Bot moved this from In review to Done in AutoDeploy Board May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AutoDeploy <NV> AutoDeploy Backend

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants