IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

get_sm_version

def get_sm_version() -> StaticString

Returns the SM version string for the current compile target.

Queries the GPU info for the default accelerator architecture and returns its version identifier (e.g. "sm_90a" for Hopper, "sm_100a" for Blackwell). The result is a comptime constant derived from GPUInfo.from_name.

Returns:

StaticString: The SM version string for the target GPU architecture.