Skip to main content
Version: 1.0

System requirements

Mojo runs on Mac, Linux, and Windows (with WSL). You don't need a GPU to program with Mojo---GPU support is optional.

For installation instructions, see the install guide.

Operating system

  • Ubuntu 22.04 LTS or later
  • x86-64 CPU (with SSE4.2 or newer) or ARM64 (AWS Graviton2/3)
  • glibc 2.34 or later

Hardware

  • CPU: x86-64 (Intel/AMD with SSE4.2) or ARM64 on Linux; Apple silicon on macOS
  • RAM: 8 GB minimum
  • GPU: Optional. Mojo supports GPU programming across NVIDIA, AMD, and Apple silicon. See GPU compatibility below for supported hardware and driver requirements.

Software

  • Python 3.10--3.14
  • C++ compiler (g++ or clang++) on Linux
  • Xcode or Xcode Command Line Tools 16 or later on macOS

GPU compatibility

Mojo supports GPU programming across NVIDIA, AMD, and Apple silicon GPUs. This section covers which GPUs work with Mojo and the software each vendor requires.

We categorize GPU compatibility into two levels:

  • Continuously tested: Run in Modular's CI on every release. High confidence that GPU code compiles and executes correctly.
  • Known compatible: Confirmed to work by Modular or community members, but not continuously tested. These GPUs share an architecture with a tested GPU and should work without issues.

NVIDIA GPUs

Software requirements

  • NVIDIA GPU driver 580 or later

    Check your driver version with nvidia-smi. To update, see the NVIDIA driver docs.

  • Older drivers: If you're using an NVIDIA driver older than 580 (common on some cloud providers), set the MODULAR_NVPTX_COMPILER_PATH environment variable to point to a system ptxas binary from a CUDA Toolkit installation:

    export MODULAR_NVPTX_COMPILER_PATH=/usr/local/cuda/bin/ptxas

    This bypasses the bundled compiler's driver version check and enables Mojo to compile GPU code with your existing driver.

Hardware compatibility

GPUArchitectureArch target
Continuously tested
B200Blackwellsm_100
H100Hoppersm_90
Known compatible
B300Blackwellsm_103
B100Blackwellsm_100
DGX SparkBlackwellsm_121
H200Hoppersm_90
L4Ada Lovelacesm_89
L40Ada Lovelacesm_89
RTX 50XX seriesBlackwellsm_120
RTX 40XX seriesAda Lovelacesm_89
A100Amperesm_80
A10Amperesm_86
RTX 30XX seriesAmperesm_86
Jetson Orin / Orin NanoAmperesm_87
Jetson ThorBlackwellsm_110
RTX 20XX seriesTuringsm_75

Pre-Turing NVIDIA GPUs: Pre-Turing GPUs (such as Pascal-generation GTX 10XX and Tesla P100) are not supported out of the box. To use Mojo on these GPUs, set the MODULAR_NVPTX_COMPILER_PATH environment variable to point to a system ptxas binary compatible with your hardware and driver version.

AMD GPUs

Software requirements

Hardware compatibility

GPUArchitectureArch target
Continuously tested
MI355XCDNA4gfx950
MI300XCDNA3gfx942
Known compatible
MI325XCDNA3gfx942
MI250XCDNA2gfx90a
Radeon RX 9070RDNA4gfx1201
Radeon RX 9060RDNA4gfx1200
Radeon 880MRDNA3.5gfx1150
Radeon 860MRDNA3.5gfx1152
Radeon 8060SRDNA3.5gfx1151
Radeon RX 7900RDNA3gfx1100
Radeon RX 7800 / 7700RDNA3gfx1101
Radeon RX 7600RDNA3gfx1102
Radeon 780MRDNA3gfx1103

Apple silicon GPUs

Software requirements

  • macOS Sequoia (15) or later

  • Xcode 16 or later

  • You may need to install the Metal toolchain after upgrading macOS or Xcode:

    xcodebuild -downloadComponent MetalToolchain

Hardware compatibility

ChipSupport level
M5Known compatible
M4Known compatible
M3Known compatible
M2Known compatible
M1Known compatible

Troubleshooting GPU detection

What Mojo looks for

When Mojo needs a GPU, the runtime attempts to load vendor-specific driver libraries in this order:

  1. NVIDIA (CUDA): loads libcuda.so.1 and libnvidia-ml.so.1
  2. AMD (HIP): loads libamdhip64.so
  3. Apple (Metal): uses the Metal framework (built into macOS)

If Mojo can't load any of these libraries, it falls back to CPU execution.

Verifying GPU access

Use the --target-accelerator flag to compile for a specific GPU architecture:

mojo build --target-accelerator=sm_90 my_kernel.mojo

To check that your system's GPU is accessible at runtime, try a minimal GPU program:

check_gpu.mojo
from gpu.host import DeviceContext

def main():
var ctx = DeviceContext()
print("GPU:", ctx.name())
mojo check_gpu.mojo

If Mojo can't find a GPU, this raises an error explaining what it tried.

Common issues

GPU not detected despite nvidia-smi showing a GPU:

  • Verify that the NVIDIA driver version is 580 or later (nvidia-smi shows the version in the top-right corner). If your driver is older, set MODULAR_NVPTX_COMPILER_PATH as described in the NVIDIA software requirements section above.
  • Ensure libcuda.so.1 is on your library path. On most systems, the NVIDIA driver installer places it in /usr/lib/x86_64-linux-gnu/ or /usr/lib64/.
  • If using a container, make sure you're passing GPU access through (for example, docker run --gpus all).
  • Set MLRT_CUDA_DEBUG=1 to get detailed logging of the CUDA detection process.

AMD GPU not detected:

  • Verify that you have ROCm/HIP installed and that libamdhip64.so is available.
  • Check your ROCm version: apt show rocm-libs 2>/dev/null | grep Version or rocm-smi --showdriverversion.
  • Ensure your user is in the render and video groups: sudo usermod -aG render,video $USER (then log out and back in).

Apple GPU not detected or Metal toolchain errors:

  • Ensure you're on macOS Sequoia (15) or later: sw_vers.
  • Install the Metal toolchain: xcodebuild -downloadComponent MetalToolchain.
  • Verify that you have Xcode Command Line Tools: xcode-select --install.

Pre-Turing NVIDIA GPU errors:

  • Set MODULAR_NVPTX_COMPILER_PATH to a compatible system ptxas binary. For example: export MODULAR_NVPTX_COMPILER_PATH=/usr/local/cuda/bin/ptxas.

WSL: GPU not detected or driver mismatch:

  • Make sure you follow the WSL-specific installation instructions for your GPU vendor, not the native Linux instructions.
  • For NVIDIA on WSL, the GPU driver should be installed on the Windows host, not inside WSL. WSL automatically makes the host driver available.
  • For AMD on WSL, see the WSL install guide for Radeon software.

If your GPU works with Mojo but isn't listed here, let us know on the Modular community forum or file a GitHub issue.