# Reproduce a GPU Kernel Benchmark run Start with the public release ZIP and an x86-64 Linux host. One H100 80 GB can run 50 packs (49 scored questions); Shared Mega MoE needs eight peer-connected B200 GPUs on the same host. Each machine can run its track independently. ## Run with Docker Install a compatible NVIDIA driver, Docker Engine, and the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). The host needs GPU container access. The Dockerfiles install the CUDA 12.9 toolkit, Python 3.11, native compilers, PyTorch, Triton, and the dependencies for the selected hardware. Building needs internet access to Docker Hub, Ubuntu package mirrors, python.org, PyPI, the PyTorch wheel index, and GitHub. Unzip `kernel-benchmark-public-v0.8.1.zip` and build from its extracted root. **One H100.** Build the image, run the environment check, then time the supplied Window Prefix Attention control. The bind mount keeps the results after the container exits. ```bash docker build -f Dockerfile -t kernelbench:h100-v081 . docker run --rm --gpus device=0 kernelbench:h100-v081 mkdir -p results docker run --rm --gpus device=0 -v "$PWD/results:/results" kernelbench:h100-v081 \ python3.11 bench.py smoke window_prefix_attention --device 0 --out /results/window-control ``` Open `results/window-control/results.json` and check that the case has `"status": "passed"`. To evaluate your own kernel, put `submission.py` in a local directory named `submission` and mount it read-only: ```bash docker run --rm --gpus device=0 -v "$PWD/results:/results" \ -v "$PWD/submission:/submission:ro" kernelbench:h100-v081 \ python3.11 bench.py run window_prefix_attention --candidate /submission/submission.py \ --device 0 --out /results/window-submission ``` **Eight B200s.** Build the B200 image and run its default command on an idle eight-B200 NVLink node with working peer access, NCCL, CUDA symmetric memory, and GPU profiling. The command runs the Shared Mega MoE EP=8 control: ```bash docker build -f Dockerfile.b200 -t kernelbench:b200-v081 . mkdir -p results docker run --rm --gpus all --shm-size=2g --ulimit memlock=-1:-1 \ -v "$PWD/results:/results" kernelbench:b200-v081 ``` Open `results/moe-control/results.json` and check the case status, forward and backward timings, and the `masked` and `shared_only` backward checks. For a repeat run, pass an explicit command with a new output directory. Compare kernel times against the baseline on the same idle device and record the driver, GPU model and image ID. A single-H100 run covers the H100 subset. The [published validation records](validation.json) cover native installations on both GPU types. The Dockerfiles were checked with BuildKit. A complete image build and a GPU run inside each image are still unverified. ## Inspect the release From the extracted root, you can inspect all 51 packs using Python 3.11 on a machine without a GPU. ```bash python3 verify.py python3 bench.py list ``` The verifier checks the source manifest, 51 task packs, and 155 public cases. The task list shows the hardware for each pack. Use one H100 80 GB for the 50 single-GPU packs. Shared Mega MoE uses eight peer-connected B200 GPUs on one host (EP=8). ## Install directly on a GPU host Start with x86-64 Linux, Python 3.11, CUDA Toolkit 12.9, and a compatible NVIDIA driver. Install the compiler and development headers listed in the [host setup instructions](README.md#prepare-a-linux-gpu-host). To install the pinned dependencies from public wheels and source repositories, run: ```bash bash upstream-env.sh ``` If you already have the frozen dependency archive, use these commands instead: ```bash bash upstream-env.sh base python3.11 -m kernel_bench.restore_h100_runtime /path/to/h100-runtime-v05-linux-cp311-r2.tar.gz ``` On H100, check the installation with `./python-gpu -m kernel_bench.preflight_h100`. Recalibrate on the target GPU before comparing timings from a new native build. ## Run a baseline and your first submission Run Window Prefix Attention on an idle H100 using the supplied baseline: ```bash python3 bench.py smoke window_prefix_attention --device 0 --out runs/window-control ``` Read the task statement and numerical contract, then copy the submission template: ```bash task=kernel_bench/taskpacks/v0.8.1-kernels/window_prefix_attention cat "$task/TASK.md" "$task/contracts.md" mkdir -p submissions/window cp "$task/submission.py" submissions/window/submission.py ``` Implement the template, then run it against the task's public cases: ```bash python3 bench.py run window_prefix_attention --candidate submissions/window/submission.py --device 0 --out runs/window-submission ``` Use a fresh output directory for each run. Open `runs/window-submission/results.json` to inspect correctness and timing for each case. This task also reports memory usage and the speedup when the kernel is used inside a fixed module. On an eight-B200 host, use the Shared Mega MoE control to check forward and backward execution across all eight GPUs: ```bash python3 bench.py smoke shared_mega_moe --device 0,1,2,3,4,5,6,7 --out runs/moe-control ``` Both installation paths passed all 51 smoke workloads across the H100 and B200 hosts. The release includes [per-task results and result hashes](validation.json). ## Reproduce a model comparison Copy `agent.example.json` to `agent.local.json` and set the model endpoint, GPU hosts. Keep `wall_seconds` at 14400 and both `turns` and `public_evaluation_seconds` at null for the four-hour comparison. Give every model the same private evaluation split. Agents receive public feedback while iterating, and the grader scores each model's final submission. Report the protocol version, hardware, dependencies, correctness, speedups, and model usage alongside the score. See [the agent commands](README.md#reproduce-an-agent-comparison) and [the scoring formula](README.md#scoring).