Repository navigation
Conversation
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>
Collaborator
Author
|
/bot run |
Collaborator
|
PR_Github #80368 [ run ] triggered by Bot. Commit: |
Collaborator
|
PR_Github #80368 [ run ] completed with state
|
Collaborator
Author
|
/bot run |
Collaborator
|
PR_Github #80383 [ run ] triggered by Bot. Commit: |
Collaborator
|
PR_Github #80383 [ run ] completed with state
|
Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
Collaborator
Author
|
/bot run |
Collaborator
|
PR_Github #80392 [ run ] triggered by Bot. Commit: |
This branch has not been deployed
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.
@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-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin 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.