warp.get_cuda_kernel_properties#
- warp.get_cuda_kernel_properties(kernel, device=None, block_dim=None)[source]#
Return properties of a compiled CUDA kernel.
The result contains
"register_count"in registers per thread and"local_memory_size"in bytes per thread. Values may vary with the device, CUDA toolchain, Warp version, compilation options, andblock_dim. Future Warp releases may add keys.- Parameters:
kernel – A concrete
@warp.kernel-decorated kernel or explicitly constructedwarp.Kernel. For a generic kernel, pass an overload returned bywarp.overload().device (Device | str | None) – The target CUDA device. If
None, use the default device, which must be CUDA.block_dim (int | None) – Threads per block for the compiled variant. If
None, use the kernel module default.
- Returns:
The complete dictionary of exposed CUDA kernel properties.
- Raises:
TypeError – If
kernelis not a Warp kernel.ValueError – If
deviceis not a valid device identifier orblock_dimis not a positive integer.RuntimeError – If
kernelis generic,deviceis not a CUDA device, or loading or the native query fails.
- Return type: