Skip to content

Add a hipify build script for PufferLib 5.0 - #688

Open
paralin wants to merge 1 commit into
PufferAI:5.0from
paralin:rocm-hipify-5
Open

Add a hipify build script for PufferLib 5.0#688
paralin wants to merge 1 commit into
PufferAI:5.0from
paralin:rocm-hipify-5

Conversation

@paralin

@paralin paralin commented Sep 11, 2026

Copy link
Copy Markdown

Follow-up to #663 targeting 5.0. Adds one 51-line build-hip.sh that runs hipify-perl on the current sources and compiles with hipcc. Generated files stay under the existing ignored build/hip/ directory.

The script handles the remaining HIP API differences, uses RCCL, and converts GPU timer ticks using HIP's wall-clock frequency. NVML/NVTX are omitted; GPU utilization displays n/a.

Verified on an RX 7700 XT (gfx1101) with ROCm 7.2.2: CartPole with a CPU environment and FP32 training, and Breakout with a GPU environment and BF16 training. Both completed 1,048,576 training steps, saved checkpoints, and passed headless checkpoint evaluation with GPU graphs enabled.

./build-hip.sh cartpole -DPRECISION_FLOAT
./build-hip.sh breakout --cu
./build/hip/puffer train

Requires ROCm and raylib 5.5. ROCM_PATH, RAYLIB_PATH, and HIP_ARCH override their defaults.

Signed-off-by: Christian Stewart <christian@aperture.us>
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.

1 participant