-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add debug hook to support dump tensor data and add new debug functions easily #5182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
8af04fa
to
8dbc872
Compare
QiJune
reviewed
Jun 16, 2025
QiJune
reviewed
Jun 16, 2025
QiJune
reviewed
Jun 16, 2025
QiJune
reviewed
Jun 16, 2025
QiJune
reviewed
Jun 16, 2025
QiJune
reviewed
Jun 17, 2025
QiJune
reviewed
Jun 18, 2025
QiJune
reviewed
Jun 18, 2025
QiJune
reviewed
Jun 18, 2025
c6f2d38
to
0c533ab
Compare
QiJune
reviewed
Jun 19, 2025
QiJune
reviewed
Jun 19, 2025
QiJune
reviewed
Jun 19, 2025
QiJune
reviewed
Jun 19, 2025
QiJune
reviewed
Jun 19, 2025
QiJune
reviewed
Jun 24, 2025
QiJune
reviewed
Jun 24, 2025
QiJune
reviewed
Jun 24, 2025
QiJune
approved these changes
Jun 24, 2025
Add context manager method to enable debugger Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
/bot skip --comment="New code and has no impact to existing code" |
PR_Github #9678 [ skip ] triggered by Bot |
PR_Github #9678 [ skip ] completed with state |
dominicshanshan
pushed a commit
to dominicshanshan/TensorRT-LLM
that referenced
this pull request
Jul 9, 2025
…s easily (NVIDIA#5182) Signed-off-by: Hui Gao
dominicshanshan
pushed a commit
to dominicshanshan/TensorRT-LLM
that referenced
this pull request
Jul 10, 2025
…s easily (NVIDIA#5182) Signed-off-by: Hui Gao
dominicshanshan
pushed a commit
to dominicshanshan/TensorRT-LLM
that referenced
this pull request
Jul 10, 2025
…s easily (NVIDIA#5182) Signed-off-by: Hui Gao
dominicshanshan
pushed a commit
to dominicshanshan/TensorRT-LLM
that referenced
this pull request
Jul 10, 2025
…s easily (NVIDIA#5182) Signed-off-by: Hui Gao
dominicshanshan
pushed a commit
to dominicshanshan/TensorRT-LLM
that referenced
this pull request
Jul 10, 2025
…s easily (NVIDIA#5182) Signed-off-by: Hui Gao
dominicshanshan
pushed a commit
to dominicshanshan/TensorRT-LLM
that referenced
this pull request
Jul 11, 2025
…s easily (NVIDIA#5182) Signed-off-by: Hui Gao
dominicshanshan
pushed a commit
to dominicshanshan/TensorRT-LLM
that referenced
this pull request
Jul 11, 2025
…s easily (NVIDIA#5182) Signed-off-by: Hui Gao
dominicshanshan
pushed a commit
to dominicshanshan/TensorRT-LLM
that referenced
this pull request
Jul 11, 2025
…s easily (NVIDIA#5182) Signed-off-by: Hui Gao
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 debug hook to support dump tensor data and add new debug functions easily.
To enable to dump tensors' data,
from tensorrt_llm._torch.debug.debug_hook import debugger_addon, register_tensor_dump_hook
with debugger_addon(model, DATA_FOLDER):
register_tensor_dump_hook()
model.forward()
The dumped data are put under DATA_FOLDER/rank[ID]/....
The data file name is in the pattern:
[LOOP_COUNT].[model_name]-[OPIDX_IN_MODEL].[OPNAME]-[OPIDX_IN_PRE_OP].[OPNAME]-[input|output].[PARA_NAME].pt
suc as 1.LlamaModel-24.LlamaDecoderLayer-2.LlamaAttention-2.Linear-1.AllReduce-input.input.pt.