Skip to content

Conversation

@LoserCheems
Copy link
Collaborator

This pull request introduces a new header file, csrc/src/hardware_info.h, that provides utility functions for querying CUDA hardware information. The changes include the addition of macros and inline functions to streamline CUDA device queries.

Key changes:

New utility functions for CUDA hardware queries:

  • Added the CHECK_CUDA macro to handle CUDA API error checking with descriptive error messages and program termination on failure.
  • Implemented get_current_device to retrieve the currently active CUDA device.
  • Added get_compute_capability to fetch the compute capability (major and minor version) of a specified CUDA device.
  • Created get_num_sm to obtain the number of streaming multiprocessors (SMs) on a given CUDA device.

@LoserCheems LoserCheems merged commit 781b938 into main May 14, 2025
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.

3 participants