Skip to main content

Module query

Module query 

Source
Expand description

Runtime-API queries: pointer attributes, device properties, kernel attributes. Typed wrappers around the cuda*GetAttributes / cudaGetDeviceProperties family.

Structs§

DeviceProperties
Subset of cudaDeviceProp fields most users care about. The full C struct is ~1 KB with fields that are rarely accessed — we surface the hot-path ones and keep a reserved _raw slot for the whole buffer so advanced users can cast through.
PointerAttributes
Typed view over cudaPointerAttributes.

Enums§

MemoryType
Memory kind reported by pointer_attributes.

Functions§

device_properties
Fetch a typed subset of cudaDeviceProp for device.
func_attributes
Query a kernel’s register / shared-memory / PTX-version metadata. func_symbol is a const void* — the address of the kernel symbol as used by cudaLaunchKernel (or crate::Kernel::as_launch_ptr).
pointer_attributes
Query what CUDA knows about ptr. On pointers CUDA has never seen (plain host malloc, returned from C libraries) this returns MemoryType::Unregistered.