Runner: built-in hybrid GPU+CPU rendering option (replace blender wrapper) #33

Closed
opened 2026-10-29 11:10:27 +00:00 by jerry · 2 comments
Contributor

Problem

The runner can only render GPU-only (HIP/CUDA/OptiX) or CPU-only (--force-cpu-rendering). Its enable_gpu.py turns on GPU devices only, so Cycles hybrid (GPU + CPU together) is impossible without hacks.

On ai1 (Ryzen AI Max+ 395, Radeon iGPU, HIP-RT) we currently get hybrid by symlinking /usr/local/bin/blender to a wrapper that injects -P hybrid-devices.py before -f/-a. It works, but it lives outside jiggablend and outside ansible, and any runner update could break it.

Evidence it is worth it

A/B test on 2026-10-28, frames 542/544/540 of a 2560x1440, 4096spp scene, Blender 5.2.3, HIP-RT on:

  • GPU-only: avg 496.3 s/frame, peak device mem 13387 MiB, ~62 W package
  • GPU+CPU: avg 398.4 s/frame, peak 10160 MiB, ~122 W package (max 160 W)
  • 19.7% faster (run-to-run spread about 3 s), about 26 h saved on a 1308-frame job. No faults. It has run clean as job 3 since then.

Ask

Add a runner option (flag and/or env, e.g. --hybrid-rendering / JIGGABLEND_HYBRID=1, default off) that, when a GPU compute type is selected, also sets use=True on the CPU device in enable_gpu.py.

  • Log the enabled devices in the task log.
  • Ignored when --force-cpu-rendering is set or no GPU is found.
  • Optional: report it to the manager so the job or runner view shows hybrid vs GPU-only.

Done when

  • The flag renders with both devices listed in the task log, and with it off nothing changes.
  • The release notes document it. After that, ops drops the ai1 wrapper and sets the flag through ansible.

Reference: the current wrapper is /usr/local/lib/jiggablend/blender-hybrid plus hybrid-devices.py on ai1.

## Problem The runner can only render GPU-only (HIP/CUDA/OptiX) or CPU-only (`--force-cpu-rendering`). Its `enable_gpu.py` turns on GPU devices only, so Cycles hybrid (GPU + CPU together) is impossible without hacks. On ai1 (Ryzen AI Max+ 395, Radeon iGPU, HIP-RT) we currently get hybrid by symlinking `/usr/local/bin/blender` to a wrapper that injects `-P hybrid-devices.py` before `-f/-a`. It works, but it lives outside jiggablend and outside ansible, and any runner update could break it. ## Evidence it is worth it A/B test on 2026-10-28, frames 542/544/540 of a 2560x1440, 4096spp scene, Blender 5.2.3, HIP-RT on: - GPU-only: avg 496.3 s/frame, peak device mem 13387 MiB, ~62 W package - GPU+CPU: avg 398.4 s/frame, peak 10160 MiB, ~122 W package (max 160 W) - 19.7% faster (run-to-run spread about 3 s), about 26 h saved on a 1308-frame job. No faults. It has run clean as job 3 since then. ## Ask Add a runner option (flag and/or env, e.g. `--hybrid-rendering` / `JIGGABLEND_HYBRID=1`, default off) that, when a GPU compute type is selected, also sets `use=True` on the CPU device in `enable_gpu.py`. - Log the enabled devices in the task log. - Ignored when `--force-cpu-rendering` is set or no GPU is found. - Optional: report it to the manager so the job or runner view shows hybrid vs GPU-only. ## Done when - The flag renders with both devices listed in the task log, and with it off nothing changes. - The release notes document it. After that, ops drops the ai1 wrapper and sets the flag through ansible. Reference: the current wrapper is `/usr/local/lib/jiggablend/blender-hybrid` plus `hybrid-devices.py` on ai1.
Owner

Triaged and assigned to Ash. The scope in the body is clear and Mira sets when it gets picked up.

Notes for the PR:

  • Keep the new option off by default, so a runner without it renders exactly as it does today. Show that in the PR with a before/after task log.
  • With it on, the task log should list every enabled device (GPU and CPU). Show one real render with both listed.
  • CPU-only mode and "no GPU found" should ignore the option. Cover those with tests.
  • Reporting hybrid vs GPU-only to the manager is optional, and fine as a follow-up issue if it grows the diff.
  • Document the flag or env var in the release notes. Ops removes the ai1 wrapper through ansible after the release, which is a separate ansible change for Jerry.
  • PR into develop. Eva reviews, Linus merges.
Triaged and assigned to Ash. The scope in the body is clear and Mira sets when it gets picked up. Notes for the PR: - Keep the new option off by default, so a runner without it renders exactly as it does today. Show that in the PR with a before/after task log. - With it on, the task log should list every enabled device (GPU and CPU). Show one real render with both listed. - CPU-only mode and "no GPU found" should ignore the option. Cover those with tests. - Reporting hybrid vs GPU-only to the manager is optional, and fine as a follow-up issue if it grows the diff. - Document the flag or env var in the release notes. Ops removes the ai1 wrapper through ansible after the release, which is a separate ansible change for Jerry. - PR into develop. Eva reviews, Linus merges.
Collaborator

Ruling: ACCEPT. This is Ash's next pick, top of his queue now.

Purpose: meets #4 (runners render with the Blender setup jiggablend controls, not a hand-placed wrapper that a runner update can break), and it cuts render time about 20% on ai1, which serves meets #1.

Acceptance, in plain words (Eva's notes above stand):

  • With the option off, a runner renders exactly as it does today.
  • With it on and a GPU found, the task log lists both the GPU and the CPU, shown with one real render.
  • CPU-only mode or no GPU: the option is ignored, and tests cover both.
  • The release notes say how to turn it on.
  • Showing hybrid vs GPU-only in the manager is a follow-up issue, not part of this PR.

Once it's released, Jerry drops the ai1 wrapper and sets the option through ansible.

Ruling: ACCEPT. This is Ash's next pick, top of his queue now. Purpose: meets #4 (runners render with the Blender setup jiggablend controls, not a hand-placed wrapper that a runner update can break), and it cuts render time about 20% on ai1, which serves meets #1. Acceptance, in plain words (Eva's notes above stand): - With the option off, a runner renders exactly as it does today. - With it on and a GPU found, the task log lists both the GPU and the CPU, shown with one real render. - CPU-only mode or no GPU: the option is ignored, and tests cover both. - The release notes say how to turn it on. - Showing hybrid vs GPU-only in the manager is a follow-up issue, not part of this PR. Once it's released, Jerry drops the ai1 wrapper and sets the option through ansible.
linus closed this issue 2026-10-30 03:54:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
s1d3sw1ped/jiggablend#33
No description provided.