Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get attribute for CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED #184

Closed
apowers313 opened this issue Oct 20, 2024 · 4 comments
Closed

Can't get attribute for CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED #184

apowers313 opened this issue Oct 20, 2024 · 4 comments
Labels
cuda.bindings Everything related to the cuda.bindings module support All things related to the project that can't be categorized

Comments

@apowers313
Copy link

When I call cuDeviceGetAttribute with cuda.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED I get the error <CUresult.CUDA_ERROR_INVALID_VALUE: 1>.

Seems like it might be an off-by-one error since it's the last value in the Enum CUdevice_attribute?

Here is some code to reproduce the problem.

@leofang
Copy link
Member

leofang commented Oct 21, 2024

What's your CUDA Python version and driver version?

  • CUDA Python version can be accessed via either python -c "from cuda import __version__; print(__version__)" (but this will change later, see [EPIC] RFC: cuda namespace cleanup #75), pip list | grep cuda if you installed it via pip, or conda list cuda-python if via conda.
  • Driver version is reported by nvidia-smi (we just need the "CUDA Version" here)

@leofang leofang added awaiting-response Further information is requested cuda.bindings Everything related to the cuda.bindings module labels Oct 21, 2024
@apowers313
Copy link
Author

CUDA Python: 12.6.0
CUDA Driver: 12.4

@leofang leofang removed the awaiting-response Further information is requested label Oct 21, 2024
@leofang
Copy link
Member

leofang commented Oct 21, 2024

This happens because the driver support for CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED was added since CUDA 12.5, so to use it you need to update both your CUDA driver and CUDA sw (in this case, cuda-python) to >=12.5.

I am not sure why this is not mentioned in the CUDA Release Notes, but the way I checked this is to search CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED in the driver API docs, which are versioned so that you can search the same term by jumping across different minor versions. It takes a few clicks to get to the right URL, but you can see the version number is encoded as part of it, e.g. https://docs.nvidia.com/cuda/archive/12.5.1/cuda-driver-api/index.html. The first time this enumerator appeared was CUDA 12.5.0.

btw what's your use case of CIG? Do you have some graphics rendering pipeline written in Python?

@leofang leofang added the support All things related to the project that can't be categorized label Oct 21, 2024
@apowers313
Copy link
Author

Use case was iterating all the enums to print out all the device capabilities to the screen.

Thanks for the help.

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 support All things related to the project that can't be categorized
Projects
None yet
Development

No branches or pull requests

2 participants