Skip to content

[None][fix] EagerMoeWorkspace test and TestResourceManager - #20947

Draft
Funatiq wants to merge 2 commits into
NVIDIA:mainfrom
Funatiq:dev/fix/workspaace_test
Draft

Funatiq wants to merge 2 commits into
NVIDIA:mainfrom
Funatiq:dev/fix/workspaace_test

Conversation

@Funatiq

@Funatiq Funatiq commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

@coderabbitai summary

Description

The two EagerMoeWorkspace memory-pressure tests query the native CUDA caching allocator memory fraction before making their first tensor allocation. Reading the current CUDA device does not initialize the PyTorch allocator, so either test can fail in a fresh process with an "Allocator not initialized for device" internal assertion.

Running the complete Google Test suite in one process masks this ordering dependency because earlier tests allocate CUDA tensors. CTest executes the registered cases in separate processes and exposes the missing setup.

Explicitly initialize the CUDA device through ATen's global context in both memory-pressure tests before reading or changing allocator quotas. Include ATen/Context.h directly for the initialization API. Keep the quota restoration and OOM assertions unchanged.

Also fix missing positional argument inTestResourceManager.

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

The two EagerMoeWorkspace memory-pressure tests query the native CUDA
caching allocator memory fraction before making their first tensor
allocation. Reading the current CUDA device does not initialize the
PyTorch allocator, so either test can fail in a fresh process with an
"Allocator not initialized for device" internal assertion.

Running the complete Google Test suite in one process masks this ordering
dependency because earlier tests allocate CUDA tensors. CTest executes the
registered cases in separate processes and exposes the missing setup.

Explicitly initialize the CUDA device through ATen's global context in
both memory-pressure tests before reading or changing allocator quotas.
Include ATen/Context.h directly for the initialization API. Keep the quota
restoration and OOM assertions unchanged.

Validation:
- Reproduced ConservativeReservationOomStillAllowsSmallerActualDemand
  failing in isolation before the fix.
- Rebuilt thUtilsTest in the project devcontainer.
- All 13 EagerMoeWorkspace and EagerMoeWorkspaceScope tests passed through
  CTest on an A100, with each test running in a fresh process.
- clang-format --dry-run --Werror and git diff --check passed.

Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
@Funatiq

Funatiq commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80368 [ run ] triggered by Bot. Commit: 7b4111d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80368 [ run ] completed with state FAILURE. Commit: 7b4111d
/LLM/main/L0_MergeRequest_PR pipeline #66145 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

@Funatiq

Funatiq commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80383 [ run ] triggered by Bot. Commit: 7b4111d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80383 [ run ] completed with state SUCCESS. Commit: 7b4111d
/LLM/main/L0_MergeRequest_PR pipeline #66159 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

Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
@Funatiq

Funatiq commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@Funatiq Funatiq changed the title [None][fix] initialize CUDA before querying eager MoE test allocator quotas [None][fix] EagerMoeWorkspace test and TestResourceManager Oct 24, 2026
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80392 [ run ] triggered by Bot. Commit: 852e053 Link to invocation

This branch has not been deployed

No deployments
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.

2 participants