Skip to content

test(cuda.core): stop generating ManagedMR + ipc_enabled cases in test_mempool_attributes - #3646

Open
mdboom wants to merge 1 commit into
NVIDIA:mainfrom
mdboom:issue3569
Open

mdboom wants to merge 1 commit into
NVIDIA:mainfrom
mdboom:issue3569

Conversation

@mdboom

@mdboom mdboom commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Closes #3569. Part of #2077.

Summary

test_mempool_attributes crossed ipc_enabled (True, False) with DeviceMR, PinnedMR and ManagedMR. ManagedMemoryResource has no IPC option, so every ManagedMR case with ipc_enabled=True skipped at runtime: 8 cases that could never run. The test now parametrizes over the valid combinations only:

@pytest.mark.parametrize(
    "mr,mr_ops,property_name,expected_type,ipc_enabled",
    [
        (mr, mr_ops, name, kind, ipc_enabled)
        for mr, mr_ops in _MEMPOOL_RESOURCE_CLASSES
        for name, kind in _MEMPOOL_ATTRIBUTES
        for ipc_enabled in (True, False)
        # ManagedMemoryResource has no IPC option.
        if mr is not ManagedMemoryResource or not ipc_enabled
    ],
)
def test_mempool_attributes(init_cuda, mr, mr_ops, property_name, expected_type, ipc_enabled):
  • The in-test skip and the "not currently run in any CI job" marker are removed.
  • ManagedMemoryResourceOptions has no ipc_enabled field, so there is no IPC rejection for managed pools to test separately.

Evidence

Locally, on an RTX 5070 and an RTX A400:

  • Before: 48 cases collected; the 8 ManagedMR + ipc_enabled=True cases skip.
  • After: 40 cases collected, none of them ManagedMR + ipc_enabled=True; all 40 pass on both GPUs.

Confirming in CI: in this PR's CI run, no test_mempool_attributes case should report SKIPPED with "does not support IPC". For example:

gh run view <CI run id> --repo NVIDIA/cuda-python --log | grep -F "test_mempool_attributes" | grep -c "does not support IPC"   # expect 0

Merge Danger

Door: two-way. Test-only change.

Blast Radius: one test. Every case that ran before still runs.

Reviewers: please feel free to push commits directly to this PR to improve it.

🤖 Generated with Claude Code

…t_mempool_attributes

test_mempool_attributes crossed ipc_enabled with DeviceMR, PinnedMR and
ManagedMR, and skipped every ManagedMR case with ipc_enabled=True at
runtime because ManagedMemoryResource has no IPC option. Those 8 cases
could never run.

Parametrize over the valid (resource class, options class, property,
ipc_enabled) combinations instead, and remove the skip and the "not
currently run in any CI job" marker.

Closes NVIDIA#3569.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mdboom mdboom added this to the cuda.core 1.4.0 milestone Nov 30, 2026
@mdboom mdboom added test Improvements or additions to tests cuda.core Everything related to the cuda.core module labels Nov 30, 2026
@mdboom mdboom self-assigned this Nov 30, 2026
@mdboom
mdboom requested review from juenglin and leofang November 30, 2026 14:51
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Expanded memory-resource validation across resource types, supported attributes, and IPC configurations, including checks for attribute values and allocation statistics.

The memory resource attribute test now generates cases for device, pinned, and managed resources without generating IPC-enabled managed resource cases. It constructs each resource from the selected case and checks its attributes and allocation counters.

Changes: Memory resource attribute test

Layer / File(s) Summary
Parameterize resource cases and validate attributes
cuda_core/tests/test_memory.py
The test uses explicit resource classes and options, excludes IPC-enabled managed resource cases, and reads attributes from the constructed resource.

Assessment against linked issues

Objective Addressed Explanation
[#3569] Do not generate IPC-enabled ManagedMemoryResource cases in test_mempool_attributes; retain the other resource and IPC combinations. ✅

Suggested reviewers: andy-jost, leofang

Change: Other · Severity of issue fixed: Low

Merge Risk: Minimal · up to e4d9c

This PR removes eight impossible managed-memory IPC test cases and keeps the remaining cases. It changes test code only, with no production impact, and it has no known merge-blocking risk.

Security architecture risk: Minimal · up to e4d9c

The test now excludes unsupported managed-memory IPC cases at collection time. It does not change how CUDA memory pools expose or enforce IPC.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1c9ed66 and e4d9cdd.

Files selected for processing: 1

  • cuda_core/tests/test_memory.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

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

cuda.core Everything related to the cuda.core module test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(cuda.core): stop generating ManagedMR + ipc_enabled cases in test_mempool_attributes

1 participant