For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
sm_id
sm_id() -> Int
Returns the Streaming Multiprocessor (SM) ID of the current thread.
The SM ID uniquely identifies which physical streaming multiprocessor the thread is executing on. This is useful for SM-level optimizations and understanding hardware utilization.
If called on non-NVIDIA GPUs, this function aborts as this functionality is only supported on NVIDIA hardware.
Returns:
Int: The SM ID of the current thread.