Skip to content

Fix deprecated clockRate field for CUDA 13.0+ compatibility#2

Open
NikitaEdin wants to merge 1 commit into
asteyven:masterfrom
NikitaEdin:fix/clockRate
Open

Fix deprecated clockRate field for CUDA 13.0+ compatibility#2
NikitaEdin wants to merge 1 commit into
asteyven:masterfrom
NikitaEdin:fix/clockRate

Conversation

@NikitaEdin

Copy link
Copy Markdown

Fix deprecated CUDA clockRate field for CUDA 13.0+ compatibility

Replaces deprecated cudaGetDeviceProperties().clockRate field with cudaDeviceGetAttribute() API to maintain compatibility with CUDA 13.0+ where the field was removed.

Changes

Replace cudaGetDeviceProperties() clock rate access with cudaDeviceGetAttribute(&clockRateKHz, cudaDevAttrClockRate, deviceId).
Maintains identical clock rate output (KHz to MHz conversion).
Resolves compilation errors on CUDA 13.0+.

Type of Change

  • Bug fix (fixes deprecated API usage and CUDA 13.0+ compatibility)

Source

https://stackoverflow.com/questions/79762890/how-do-i-get-the-gpu-clock-rate-in-cuda-13

Replaces deprecated deviceProp.clockRate with cudaDeviceGetAttribute for clock rate retrieval, ensuring compatibility with CUDA 13.0 and newer. Clock rate is now displayed in MHz.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant