Skip to content

Accept zero BAR size for integrated GPUs in cuFile test - #3169

Merged
isVoid merged 2 commits into
NVIDIA:mainfrom
isVoid:fix/cufile-integrated-bar
Oct 21, 2026
Merged

isVoid merged 2 commits into
NVIDIA:mainfrom
isVoid:fix/cufile-integrated-bar

Conversation

@isVoid

@isVoid isVoid commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #3167.

Use CU_DEVICE_ATTRIBUTE_INTEGRATED instead of the Tegra model-name helper to determine the minimum expected BAR size in test_get_bar_size_in_kb.

GB10 is an integrated GPU and successfully reports zero BAR size, but get_tegra_kind() does not recognize it. The existing test therefore incorrectly requires a positive size.

The test still runs on GB10 and asserts an integer, nonnegative result. Discrete GPUs still require a positive BAR size. The device-attribute query must return CUDA_SUCCESS; existing cuFile error handling is unchanged. No production binding or CI workflow changes.

This is separate from #2299, which concerned cuFile error-status handling on GH200 rather than rejecting a successfully returned zero.

Validation

  • pytest -v -rs cuda_bindings/tests/test_cufile.py::test_get_bar_size_in_kb: 1 passed on an NVIDIA A30 (discrete GPU), driver 595.84.
  • Eight mocked cases checked integrated/discrete GPUs with zero, positive, negative, or non-integer BAR values and a failing CUDA attribute query. Zero passes only for integrated GPUs; invalid results still fail.
  • Ruff check/format, applicable pre-commit hooks, and git diff --check passed.
  • Local Python 3.13 used the existing cuda-bindings 13.4.2.dev243+gf9de5797e wheel environment. No new source build or GB10 rerun for this public branch; integrated behavior was checked with mocks locally.
  • Five existing unknown-thread_unsafe-marker warnings were emitted by the local environment, which lacks pytest-run-parallel.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes. (Test-only change; no public API changes.)

@github-actions github-actions Bot added the cuda.bindings Everything related to the cuda.bindings module label Oct 20, 2026
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 37f3055d-6cec-41c8-80ac-dc417456011b
📥 Commits

Reviewing files that changed from the base of the PR and between bdb6910 and 3ff8bda.

📒 Files selected for processing: 1
  • cuda_bindings_13/tests/test_cufile.py

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

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Updated BAR size validation to correctly account for integrated and discrete GPUs.
    • Removed the previous platform-specific exception in favor of CUDA’s GPU classification.

The cuFile BAR-size test now queries CUDA’s integrated-device attribute. It permits a minimum BAR size of zero for integrated GPUs and retains a minimum of one KB for discrete GPUs.

Changes: cuFile BAR-size test

Layer / File(s) Summary
Select BAR-size minimum
cuda_bindings_13/tests/test_cufile.py
The test uses the integrated-device attribute to select a minimum BAR size of zero for integrated GPUs or one KB for discrete GPUs. It asserts that the attribute query succeeds.

Assessment against linked issues

Objective Addressed Explanation
[3167] Use CU_DEVICE_ATTRIBUTE_INTEGRATED to allow a zero BAR size for integrated GPUs, retain the positive-size requirement for discrete GPUs, and assert that the attribute query succeeds. ✅

Suggested reviewers: rwgk

Priority: ⬇️ Low

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 3ff8b

The BAR-size test change is consistent with the stated integrated-GPU behavior and has no unresolved merge-blocking risk.

✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
Doc Preview CI
Preview removed because the pull request was closed or merged.

@isVoid isVoid self-assigned this Oct 21, 2026
@isVoid isVoid added this to the cuda.bindings 13.5.0 & 12.9.10 milestone Oct 21, 2026
@isVoid isVoid added the test Improvements or additions to tests label Oct 21, 2026
@isVoid
isVoid requested a review from rwgk October 21, 2026 19:33
@isVoid
isVoid merged commit 06e3aa3 into NVIDIA:main Oct 21, 2026
217 of 223 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 22, 2026
Removed preview folders for the following PRs:
- PR #3046
- PR #3148
- PR #3168
- PR #3169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: cuFile BAR-size test rejects zero on GB10 integrated GPUs

2 participants