Skip to content

[None][chore] memory observability probes for DSv4 mem-opts validation#14308

Merged
lancelly merged 3 commits into
NVIDIA:feat/deepseek_v4from
lancelly:mem-observability-draft
May 22, 2026
Merged

[None][chore] memory observability probes for DSv4 mem-opts validation#14308
lancelly merged 3 commits into
NVIDIA:feat/deepseek_v4from
lancelly:mem-observability-draft

Conversation

@lancelly

@lancelly lancelly commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Add some memory profile log.
Moe related workspace and activation tensor should be traced in a seperate PR, as well as attention active tensor.

@lancelly
lancelly force-pushed the mem-observability-draft branch 7 times, most recently from f43cb31 to 88b8b00 Compare May 20, 2026 03:14
Adds a small leaf helper ``tensorrt_llm/_torch/pyexecutor/trace_log_utils.py``
that any pyexecutor / module file can import without circular dependencies.
It exposes two probes, both no-op unless ``TLLM_LOG_MEM_PROFILE=1``:

1. ``log_mem_snapshot(tag)`` — prints the canonical GPU memory fields
   (torch_alloc / torch_reserved + their peaks / free / total). Used at
   four coarse warmup boundaries in ``model_engine.py``:
       warmup/before_warmup
       warmup/after_autotuner
       warmup/after_cuda_graph_capture
       warmup/after_memory_pool_prepop

2. ``log_tensor_size(tag, tensor, **extra)`` — one-line single-tensor
   footprint (shape / dtype / bytes). Wired into
   ``attention_backend/interface.py`` as ``[mem-profile/rope/new_table]``,
   firing once per unique ``RopeParams`` cache miss to report the cos/sin
   table size. For models using YaRN scaling at default HF
   ``max_position_embeddings`` this can be multiple GiB which is
   otherwise invisible.

Default OFF is byte-identical to upstream (zero overhead, no log volume).
Single env var switches everything on.

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
@lancelly
lancelly force-pushed the mem-observability-draft branch from 88b8b00 to 52096ff Compare May 20, 2026 03:27
@lancelly
lancelly marked this pull request as ready for review May 20, 2026 07:13
@lancelly
lancelly requested review from a team as code owners May 20, 2026 07:13
@lancelly
lancelly requested review from joyang-nv and pengbowang-nv and removed request for a team May 20, 2026 07:13
@lancelly

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49389 [ run ] triggered by Bot. Commit: 52096ff Link to invocation

@pengbowang-nv pengbowang-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Attention change LGTM

Comment thread tensorrt_llm/_torch/attention_backend/interface.py Outdated
…interface.py

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49389 [ run ] completed with state SUCCESS. Commit: 52096ff
/LLM/main/L0_MergeRequest_PR pipeline #39041 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@lancelly

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49533 [ run ] triggered by Bot. Commit: 4043a7e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49533 [ run ] completed with state SUCCESS. Commit: 4043a7e
/LLM/main/L0_MergeRequest_PR pipeline #39163 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@lancelly

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49630 [ run ] triggered by Bot. Commit: 4043a7e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49630 [ run ] completed with state SUCCESS. Commit: 4043a7e
/LLM/main/L0_MergeRequest_PR pipeline #39253 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@lancelly

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49724 [ run ] triggered by Bot. Commit: 4043a7e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49724 [ run ] completed with state FAILURE. Commit: 4043a7e
/LLM/main/L0_MergeRequest_PR pipeline #39330 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@lancelly

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49807 [ run ] triggered by Bot. Commit: 4043a7e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49807 [ run ] completed with state SUCCESS. Commit: 4043a7e
/LLM/main/L0_MergeRequest_PR pipeline #39394 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@lancelly

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49916 [ run ] triggered by Bot. Commit: 4043a7e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49916 [ run ] completed with state SUCCESS. Commit: 4043a7e
/LLM/main/L0_MergeRequest_PR pipeline #39495 completed with status: 'SUCCESS'

CI Report

Link to invocation

@lancelly
lancelly merged commit 2de7acb into NVIDIA:feat/deepseek_v4 May 22, 2026
6 checks passed
lfr-0531 pushed a commit to lfr-0531/TensorRT-LLM that referenced this pull request Jun 10, 2026
NVIDIA#14308)

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
lfr-0531 pushed a commit to lfr-0531/TensorRT-LLM that referenced this pull request Jun 11, 2026
NVIDIA#14308)

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
lfr-0531 pushed a commit to lfr-0531/TensorRT-LLM that referenced this pull request Jun 12, 2026
NVIDIA#14308)

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
jiaganc added a commit to jiaganc/TensorRT-LLM that referenced this pull request Jun 26, 2026
NVIDIA#14308)

Source-Commit: 2de7acb
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
jiaganc added a commit to jiaganc/TensorRT-LLM that referenced this pull request Jun 29, 2026
NVIDIA#14308)

Source-Commit: 2de7acb
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants