Documentation

Documentation

Installation Guide

Step-by-step installation instructions for ManifoldScript across different operating systems.

macOS Installation

Requirements

  • • macOS 14.0 Sonoma or later
  • • Apple Silicon (M1/M2/M3) or Intel Mac
  • • Xcode 15.0 or later
  • • 16GB RAM minimum (32GB recommended)
# Install using Homebrew
brew install manifoldscript/tap/manifoldscript

# Or install directly with curl
curl -fsSL https://get.manifoldscript.dev/macos | bash

# Verify installation
manifoldscript --version
manifoldscript --check-system

macOS Installation Flow

graph TD A[macOS System] --> B[Xcode Tools] B --> C[ManifoldScript Install] C --> D[Metal Framework] D --> E[GPU Detection] E --> F[Setup Complete] classDef system fill:#e3f2fd classDef install fill:#f3e5f5 classDef verify fill:#e8f5e9 class A system class B,C,D,E install class F verify

Linux Installation

Requirements

  • • Ubuntu 22.04/24.04, RHEL 9, or SUSE 15
  • • NVIDIA, AMD, or Intel GPU
  • • GPU drivers installed
  • • 8GB VRAM minimum (16GB recommended)

NVIDIA CUDA

# Add CUDA repository
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install cuda

# Install ManifoldScript
curl -fsSL https://get.manifoldscript.dev/cuda | bash

AMD ROCm

# Install ROCm
sudo apt-get install wget
wget https://repo.radeon.com/amdgpu-install/6.0/ubuntu/jammy/amdgpu-install_6.0.60200-1_all.deb
sudo apt-get install ./amdgpu-install_6.0.60200-1_all.deb
sudo amdgpu-install --usecase=rocm

# Install ManifoldScript
curl -fsSL https://get.manifoldscript.dev/rocm | bash

Intel oneAPI

# Install oneAPI
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-basekit

# Install ManifoldScript
curl -fsSL https://get.manifoldscript.dev/intel | bash

Linux Installation Flow

graph TD A[Linux System] --> B[GPU Driver] B --> C{GPU Type} C -->|NVIDIA| D[CUDA Toolkit] C -->|AMD| E[ROCm Platform] C -->|Intel| F[oneAPI] D --> G[ManifoldScript] E --> G F --> G G --> H[Setup Complete] classDef system fill:#e3f2fd classDef driver fill:#f3e5f5 classDef platform fill:#e8f5e9 classDef install fill:#fff3e0 class A system class B driver class C,D,E,F platform class G,H install

Windows Installation

Requirements

  • • Windows 10/11 (64-bit)
  • • WSL 2 (Windows Subsystem for Linux)
  • • NVIDIA GPU with CUDA support
  • • 16GB RAM minimum
# Install WSL
wsl --install -d Ubuntu-22.04

# Install Windows GPU drivers
# Download from NVIDIA website
# https://www.nvidia.com/Download/index.aspx

# Inside WSL Ubuntu
sudo apt update
sudo apt upgrade

# Install CUDA in WSL
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda-repo-wsl-ubuntu-12-3-local_12.3.0-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-12-3-local_12.3.0-1_amd64.deb
sudo cp /var/cuda-repo-wsl-ubuntu-12-3-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda

# Install ManifoldScript
curl -fsSL https://get.manifoldscript.dev/wsl | bash

Windows/WSL Installation Flow

graph TD A[Windows Host] --> B[WSL 2] B --> C[Ubuntu Linux] C --> D[Windows GPU Driver] D --> E[CUDA in WSL] E --> F[ManifoldScript] F --> G[GPU Passthrough] G --> H[Setup Complete] classDef windows fill:#e3f2fd classDef wsl fill:#f3e5f5 classDef gpu fill:#e8f5e9 classDef install fill:#fff3e0 class A windows class B,C wsl class D,E gpu class F,G,H install

Verification

Test Your Installation

# Check ManifoldScript version
manifoldscript --version

# Check system compatibility
manifoldscript --check-system

# List available GPUs
manifoldscript --list-gpus

# Run a simple test
manifoldscript eval --gpu "tensor_add([1,2,3], [4,5,6])"

# Compile an example
manifoldscript compile examples/hello.ms
./hello

Troubleshooting

Common Issues

  • • GPU not detected: Check drivers
  • • Permission denied: Use sudo
  • • CUDA not found: Update PATH
  • • Memory errors: Check GPU memory

Getting Help

  • • Check logs: ~/.manifoldscript/logs
  • • Debug mode: --verbose flag
  • • Community: Discord server
  • • Issues: GitHub repository