Skip to content

feat(runner): replace C++ runner with Python JSON protocol - #108

Open
tetsuo-cpp wants to merge 1 commit into
canonfrom
feat/python-json-runner
Open

feat(runner): replace C++ runner with Python JSON protocol#108
tetsuo-cpp wants to merge 1 commit into
canonfrom
feat/python-json-runner

Conversation

@tetsuo-cpp

@tetsuo-cpp tetsuo-cpp commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the C++ runner with a Python cuda-python runner that takes three file paths: PTX, launch-options JSON, and result JSON. No request/result data is passed through stdin or stdout.
  • Support typed scalar/array parameters, multiple outputs, validation, and structured error results. The runner accepts both plain and NUL-terminated PTX.
  • Update the GPU harness to upload the PTX and request files, invoke the runner, and download the result file. Install Python bindings on the GPU host instead of compiling with nvcc.
  • Remove the C++ runner and its CMake integration, update documentation/dependencies, and add file-interface, CUDA-call, and harness regression tests.

Closes #50.

Usage

uv run python gpu_test/warpforth_runner.py kernel.ptx request.json result.json

Verification

  • Final file-only interface: all 38 GPU tests passed on Vast.ai targeting sm_70, including multiple outputs, matrix multiplication, and attention kernels. Latest rerun: 38 passed, 47 deselected in 1015.52 seconds.
  • All 47 non-GPU pytest tests passed; Ruff lint and formatting checks and git diff --check passed.
  • Compiler build and all 117 LIT tests passed during implementation.
  • Vast.ai instance cleanup was verified after the final run. Earlier attempts encountered provisioning and CUDA host-compatibility failures; those instances were also cleaned up.

@tetsuo-cpp
tetsuo-cpp force-pushed the feat/python-json-runner branch from f552343 to 7bf266c Compare September 5, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace warpforth-runner C++ CLI with Python cuda-python + JSON protocol

1 participant