Installation¶
This guide walks you through installing all four gpuemu components: the Rust CLI, the Python client library, and the VS Code extension.
Prerequisites Checklist¶
Before you begin, make sure you have the following installed:
- Git (any recent version)
- Rust 1.70+ (for the CLI)
- Python 3.9+ (for the Python client)
- pip or uv (Python package manager)
- VS Code 1.85+ (optional, for the editor extension)
- Node.js 18+ and npm (optional, only if building the VS Code extension from source)
Check your existing versions
1. Rust CLI (gpuemu)¶
The CLI is the primary interface for running validations, controlling the daemon, fuzzing, and CI integration.
Install Rust (if needed)¶
Install from crates.io (recommended)¶
This builds and installs the gpuemu binary onto your PATH (under ~/.cargo/bin). Verify it:
That's it — skip ahead to the Python client. The steps below are only needed if you'd rather build from a checkout.
Build from source (alternative)¶
For contributors, or to track main, clone the repository and build the release binary:
The compiled binary will be at target/release/gpuemu.
Install the binary¶
Copy the binary to a well-known location and add it to your PATH:
Add the following to your ~/.bashrc or ~/.zshrc:
Then reload your shell:
Why ~/.gpuemu/bin?
The ~/.gpuemu/ directory is also where the daemon stores its socket file (gpuemu.sock), database, and logs. Keeping the binary here keeps all gpuemu runtime artifacts in one place. You can install the binary anywhere on your PATH if you prefer.
2. Python Client (gpuemu)¶
The Python client provides programmatic access to the gpuemu daemon, including framework-specific adapters for PyTorch, JAX, and TensorFlow.
Core installation¶
Install the package from PyPI:
This installs the core library with the following dependencies:
| Dependency | Minimum Version |
|---|---|
pynng |
>= 0.8.0 |
numpy |
>= 1.20.0 |
Using a virtual environment
It is strongly recommended to install gpuemu inside a virtual environment:
Framework extras¶
Install optional framework-specific adapters using pip extras:
You can combine extras if you work with multiple frameworks:
3. VS Code Extension¶
The VS Code extension provides live diagnostics, code actions, test explorer integration, and on-save validation directly in your editor.
Option A: Install from VSIX¶
If a pre-built .vsix file is available (e.g., from a release or CI artifact):
- Open VS Code.
- Open the Command Palette (Ctrl+Shift+P on Linux, Cmd+Shift+P on macOS).
- Type "Extensions: Install from VSIX..." and select it.
- Browse to the
.vsixfile and install.
Option B: Build from source¶
Navigate to the extension directory, install dependencies, and compile:
Then either:
- Package as VSIX: Run
npx vsce packageto create a.vsixfile, then install it via VS Code as described above. - Development mode: Open the
vscode-gpuemu/folder in VS Code and press F5 to launch a development Extension Host.
Requirements
- VS Code 1.85+ is required.
- Node.js 18+ and npm are required for building from source.
- The extension expects the
gpuemuCLI to be available on yourPATH.
4. Verifying Installation¶
After installing each component, verify that everything is working correctly.
CLI¶
You should see output like:
Python client¶
You should see:
VS Code extension¶
- Open VS Code.
- Open the Extensions panel (Ctrl+Shift+X on Linux, Cmd+Shift+X on macOS).
- Search for "gpuemu" in the installed extensions list.
- Confirm the extension is listed and enabled.
All set
If all three checks pass, your gpuemu installation is complete. Head to the Quick Start guide to run your first validation.
Troubleshooting¶
| Problem | Solution |
|---|---|
cargo build fails with missing dependencies |
Make sure you have a C linker installed. On Linux: sudo apt install build-essential. On macOS: xcode-select --install. |
pip install gpuemu fails |
Ensure you are using Python 3.9+ and pip is up to date: pip install --upgrade pip. |
gpuemu version says "command not found" |
Ensure ~/.gpuemu/bin (or wherever you placed the binary) is in your PATH. Open a new terminal after editing your shell config. |
| VS Code extension does not activate | Check that the gpuemu CLI is on your PATH and that you are running VS Code 1.85 or higher. |
import gpuemu raises ModuleNotFoundError |
Make sure you installed the package in the same Python environment you are running. Check which python and pip list | grep gpuemu. |
Next Steps¶
- Quick Start -- Run your first validation in 5 minutes.
- Configuration -- Customize tolerances, dtypes, and policies.