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
- Linux
- Mac
- Windows
- Ubuntu 22.04 LTS or later
- x86-64 CPU (with SSE4.2 or newer) or ARM64 (AWS Graviton2/3)
- glibc 2.34 or later
- macOS Sequoia (15) or later
- Apple silicon (M1--M5 processor)
Mojo doesn't natively support Windows. You can use Mojo on Windows with WSL using a compatible version of Ubuntu (see the Linux requirements).
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++orclang++) 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_PATHenvironment variable to point to a systemptxasbinary from a CUDA Toolkit installation:export MODULAR_NVPTX_COMPILER_PATH=/usr/local/cuda/bin/ptxasThis bypasses the bundled compiler's driver version check and enables Mojo to compile GPU code with your existing driver.
Hardware compatibility
| GPU | Architecture | Arch target |
|---|---|---|
| Continuously tested | ||
| B200 | Blackwell | sm_100 |
| H100 | Hopper | sm_90 |
| Known compatible | ||
| B300 | Blackwell | sm_103 |
| B100 | Blackwell | sm_100 |
| DGX Spark | Blackwell | sm_121 |
| H200 | Hopper | sm_90 |
| L4 | Ada Lovelace | sm_89 |
| L40 | Ada Lovelace | sm_89 |
| RTX 50XX series | Blackwell | sm_120 |
| RTX 40XX series | Ada Lovelace | sm_89 |
| A100 | Ampere | sm_80 |
| A10 | Ampere | sm_86 |
| RTX 30XX series | Ampere | sm_86 |
| Jetson Orin / Orin Nano | Ampere | sm_87 |
| Jetson Thor | Blackwell | sm_110 |
| RTX 20XX series | Turing | sm_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
-
AMD GPU driver 6.3.3 or later (MI355X requires ROCm 7.0 or later)
- For data center GPUs (Instinct series), see the Ubuntu native install guide.
- For Radeon GPUs on Ubuntu, see the Linux install guide for Radeon software.
- For Radeon GPUs on WSL, see the WSL install guide for Radeon software.
Hardware compatibility
| GPU | Architecture | Arch target |
|---|---|---|
| Continuously tested | ||
| MI355X | CDNA4 | gfx950 |
| MI300X | CDNA3 | gfx942 |
| Known compatible | ||
| MI325X | CDNA3 | gfx942 |
| MI250X | CDNA2 | gfx90a |
| Radeon RX 9070 | RDNA4 | gfx1201 |
| Radeon RX 9060 | RDNA4 | gfx1200 |
| Radeon 880M | RDNA3.5 | gfx1150 |
| Radeon 860M | RDNA3.5 | gfx1152 |
| Radeon 8060S | RDNA3.5 | gfx1151 |
| Radeon RX 7900 | RDNA3 | gfx1100 |
| Radeon RX 7800 / 7700 | RDNA3 | gfx1101 |
| Radeon RX 7600 | RDNA3 | gfx1102 |
| Radeon 780M | RDNA3 | gfx1103 |
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
| Chip | Support level |
|---|---|
| M5 | Known compatible |
| M4 | Known compatible |
| M3 | Known compatible |
| M2 | Known compatible |
| M1 | Known 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:
- NVIDIA (CUDA): loads
libcuda.so.1andlibnvidia-ml.so.1 - AMD (HIP): loads
libamdhip64.so - 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:
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-smishows the version in the top-right corner). If your driver is older, setMODULAR_NVPTX_COMPILER_PATHas described in the NVIDIA software requirements section above. - Ensure
libcuda.so.1is 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=1to get detailed logging of the CUDA detection process.
AMD GPU not detected:
- Verify that you have ROCm/HIP installed and that
libamdhip64.sois available. - Check your ROCm version:
apt show rocm-libs 2>/dev/null | grep Versionorrocm-smi --showdriverversion. - Ensure your user is in the
renderandvideogroups: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_PATHto a compatible systemptxasbinary. 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.