Update AutoDeploy integration with trtllm-bench. Fixes uses of overlap scheduler in trtllm - #58
Closed
suyoggupta wants to merge 14 commits into
Closed
Update AutoDeploy integration with trtllm-bench. Fixes uses of overlap scheduler in trtllm#58suyoggupta wants to merge 14 commits into
suyoggupta wants to merge 14 commits into
Conversation
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR updates the AutoDeploy integration for trtllm-bench by adjusting the configuration handling and enhancing logging in the KV cache transformation.
- In tensorrt_llm/bench/dataclasses/configuration.py, the auto deploy configuration is now modified using dictionary indexing rather than instantiating _AutoDeployLlmArgs.
- In tensorrt_llm/_torch/auto_deploy/transformations/library/kvcache.py, additional logging for free memory ratio is added and the free/total memory log message is refined to display values in MB.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tensorrt_llm/bench/dataclasses/configuration.py | Changed config construction to use dictionary updates, which may affect type consistency. |
| tensorrt_llm/_torch/auto_deploy/transformations/library/kvcache.py | Added log for free memory ratio and adjusted memory logging for clarity. |
Comments suppressed due to low confidence (1)
tensorrt_llm/bench/dataclasses/configuration.py:114
- The original creation of ad_config via _AutoDeployLlmArgs was replaced with direct assignment from self.pytorch_config; please verify that self.pytorch_config is of the expected dictionary type and that downstream usage will handle the updated structure correctly.
ad_config = self.pytorch_config
…e.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
lucaslie
reviewed
Jun 10, 2025
|
Should we add a unit test? Could look similar to https://github.com/nv-auto-deploy/TensorRT-LLM/blob/743fb0a159695d59c0186702e7433b7594a6048c/tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.py. We test some miniature models and use a patch to check if configs get passed through correctly |
lucaslie
reviewed
Jun 10, 2025
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
Author
|
Probably a good idea to add a unit test. |
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
Author
|
test added |
lucaslie
reviewed
Jun 11, 2025
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
lucaslie
reviewed
Jun 11, 2025
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
Signed-off-by: Suyog Gupta <41447211+suyoggupta@users.noreply.github.com>
Author
|
will open a PR to trtllm main to test this on CI |
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.
See copilot generated description
usage:
trtllmruntime. [AutoDeploy] Support overlap scheduler NVIDIA/TensorRT-LLM#4364python examples/auto_deploy/build_and_run_ad.py --config '{"model": "meta-llama/Llama-3.1-8B", "attn_backend":"FlashInfer", "runtime":"trtllm", "world_size":1, "compile_backend":"torch-opt"}'produces legible outputs:prepare_inputsAutoDeploy:
Pytorch:
AutoDeploy with triton rms norm kernel
AutoDeploy with flashinfer norm kernel: