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

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.

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.

has_nvidia_gpu_accelerator[subarchs: List[String]]() -> Bool

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

Parameters:

  • subarchs (List[String]): The NVIDIA GPU sub-architectures to check for (e.g., ["sm_80", "sm_86"]).

Returns:

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