Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Handle unsupported device attributes gracefully#1409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Andy-Jost wants to merge2 commits intoNVIDIA:main
base:main
Choose a base branch
Loading
fromAndy-Jost:nvbug5605010

Conversation

@Andy-Jost
Copy link
Contributor

@Andy-JostAndy-Jost commentedDec 18, 2025
edited
Loading

Summary

Adds defensive error handling inDeviceProperties._get_attribute() to gracefully handle cases wherecuDeviceGetAttribute returnsCUDA_ERROR_INVALID_VALUE for unsupported attributes.

Changes

  • Modified_get_attribute in_device.pyx to check forCUDA_ERROR_INVALID_VALUE before raising an exception
  • When the driver returns this error, the method now returns0 as a conservative default
    • For boolean attributes (e.g.,vulkan_cig_supported),0 meansFalse
    • For integer attributes,0 indicates "not supported" or "disabled"

Rationale

This addresses two scenarios:

  1. Version mismatch: When cuda-core is compiled against a newer CUDA toolkit (e.g., 12.9) but runs on an older driver (e.g., 12.8), newer attribute IDs may not be recognized by the driver
  2. Driver bugs: Cases like nvbug5605010 where the driver advertises CUDA 12.9 capability but incorrectly rejects attribute 138 (CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED) withCUDA_ERROR_INVALID_VALUE

Previously, these scenarios would causeDeviceProperties properties to raiseCUDAError exceptions, breaking tests and user code. With this change, unsupported attributes return sensible defaults (0/False) instead of raising exceptions.

Test Coverage

  • Existing tests should continue to pass
  • Tests that previously failed withCUDA_ERROR_INVALID_VALUE (e.g.,test_device.py) will now pass by returning0
  • No new tests added (defensive handling preserves existing behavior for supported attributes)

Related Work

  • Addresses nvbug5605010 (driver 575.66 incorrectly rejecting attribute 138)
  • Handles version mismatches observed on luna-prod (CUDA 12.8 driver rejecting attributes 138, 141, 142)

@Andy-JostAndy-Jost added this to thecuda.core beta 11 milestoneDec 18, 2025
@Andy-JostAndy-Jost added bugSomething isn't working P0High priority - Must do! cuda.coreEverything related to the cuda.core module labelsDec 18, 2025
@Andy-JostAndy-Jost self-assigned thisDec 18, 2025
@copy-pr-bot
Copy link
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilitieshere.

Contributors can view more details about this messagehere.

@Andy-Jost
Copy link
ContributorAuthor

/ok to testdef7312

copy-pr-bot[bot] reacted with thumbs up emoji

@github-actions
Copy link

@Andy-Jost
Copy link
ContributorAuthor

/ok to test7e05f5a

copy-pr-bot[bot] reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@leofangleofangAwaiting requested review from leofang

@rparolinrparolinAwaiting requested review from rparolin

@rwgkrwgkAwaiting requested review from rwgk

At least 1 approving review is required to merge this pull request.

Assignees

@Andy-JostAndy-Jost

Labels

bugSomething isn't workingcuda.coreEverything related to the cuda.core moduleP0High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Andy-Jost

[8]ページ先頭

©2009-2025 Movatter.jp