Skip to main content

Documentation Corpus

The wafer corpus command manages local copies of GPU programming documentation. Download documentation for offline access and use with the AI agent.

Quick Start

# List available corpora
wafer corpus list

# Download CUDA documentation
wafer corpus download cuda

# Get the local path
wafer corpus path cuda

Commands

wafer corpus list

List available documentation corpora:
wafer corpus list
Output:
Available Corpora:

  cuda      CUDA Programming Guide, Best Practices, API Reference
            Size: ~150 MB
            Status: not downloaded

  cutlass   NVIDIA CUTLASS Library Documentation
            Size: ~50 MB
            Status: downloaded (v3.4)

  hip       AMD HIP Programming Guide and API
            Size: ~80 MB
            Status: not downloaded

  amd       AMD ROCm Documentation and Optimization Guides
            Size: ~120 MB
            Status: not downloaded

  triton    Triton Language Documentation
            Size: ~30 MB
            Status: downloaded (latest)

wafer corpus download

Download a documentation corpus:
wafer corpus download [OPTIONS] <corpus-name>
Options:
OptionDescription
--forceRe-download even if already present
--versionSpecific version to download
Examples:
# Download CUDA docs
wafer corpus download cuda

# Re-download to get updates
wafer corpus download cuda --force

# Download specific version
wafer corpus download cutlass --version 3.4

wafer corpus sync

Sync corpus to latest version:
wafer corpus sync [corpus-name]
Without a corpus name, syncs all downloaded corpora:
# Sync specific corpus
wafer corpus sync cuda

# Sync all downloaded corpora
wafer corpus sync

wafer corpus path

Get the local filesystem path:
wafer corpus path <corpus-name>
Output:
/Users/you/.wafer/corpora/cuda
Useful for:
  • Pointing other tools at the docs
  • Manual browsing
  • Custom indexing

Available Corpora

cuda

NVIDIA CUDA documentation:
  • CUDA C++ Programming Guide
  • CUDA Best Practices Guide
  • CUDA Runtime API Reference
  • PTX ISA Reference
  • cuBLAS, cuDNN, cuFFT documentation

cutlass

NVIDIA CUTLASS library:
  • CUTLASS User Guide
  • CUTE (CuTe) Tutorial
  • Kernel examples
  • Performance optimization guides

hip

AMD HIP documentation:
  • HIP Programming Guide
  • HIP API Reference
  • CUDA to HIP porting guide
  • hipBLAS, hipFFT documentation

amd

AMD ROCm ecosystem:
  • ROCm Installation Guide
  • AMD GPU Architecture
  • ROCprofiler documentation
  • Optimization guides

triton

OpenAI Triton:
  • Triton Language Reference
  • Tutorial notebooks
  • Kernel examples
  • Best practices

Using with the Agent

The AI agent can search documentation corpora:
# Query CUDA docs
wafer agent -c cuda "How do I use shared memory with dynamic allocation?"

# Query CuTLASS docs
wafer agent -c cutlass "Show me a GEMM kernel example"

# Query AMD docs
wafer agent -c hip "How do I port cuda to HIP?"
The agent automatically searches the downloaded corpus for relevant information.

Storage Location

Corpora are stored in:
PlatformLocation
macOS~/.wafer/corpora/
Linux~/.wafer/corpora/
Windows%USERPROFILE%\.wafer\corpora\

Offline Usage

Once downloaded, corpora work completely offline:
# Works without internet
wafer agent -c cuda "Explain thread synchronization"

Next Steps