IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
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).

has_nvidia_gpu_accelerator

def has_nvidia_gpu_accelerator() -> Bool

Returns True if the host system has an NVIDIA GPU and False otherwise.

Returns:

Bool: True if the host system has an NVIDIA GPU.

def has_nvidia_gpu_accelerator[subarch: String]() -> Bool

Returns True if the host system has an NVIDIA GPU of the specified sub-architecture and False otherwise.

Parameters:

  • subarch (String): The NVIDIA GPU sub-architecture to check for (e.g., "sm_80").

Returns:

Bool: True if the host system has an NVIDIA GPU of the specified sub-architecture and False otherwise.

def has_nvidia_gpu_accelerator[subarchs: List[StringSlice[StaticConstantOrigin]]]() -> Bool

Returns True if the host system has an NVIDIA GPU of the specified sub-architecture and False otherwise.

Parameters:

Returns:

Bool: True if the host system has an NVIDIA GPU of the specified sub-architecture and False otherwise.