Repository navigation
gpu: review follow-ups: cache-write fallback, warm-up mesh mode + deadline - #61
Conversation
The disk error path returned the translation as an error, and Shader::translated remembers failures for the rest of the run: a full or read-only cache directory cost every draw of the program. The shader is now returned uncached (the same work the converter just did). Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…dline Warm-up wrote only native-mesh cache entries while emulation hardware keys by the emulation mode, so mesh programs still translated on first use there. The mode now follows the machine's mesh support. And once VICTORY_WARM_SECONDS expires, the walk stops opening assets instead of scanning every remaining one for workers that break out at once. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ne first Only a mesh program's container keys by the mesh mode at runtime: warming every container in the emulation mode on emulation hardware left vertex, pixel and compute shaders uncached there. The mode now follows the container's own stage. Warm-up also probes the view-index cap as runtime translation does, and the deadline check leads the entry loop so later roots are not walked for nothing. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Devin Review found 4 findings. Devin fixed 3 findings; 1 finding is left for you to triage below.
Fixed by Devin (3)
- Warm-up still needs the view limit — Fixed: warm now probes the view-index cap before translating, as runtime translation does.
- Asset traversal continues past deadline — Fixed: the deadline check now leads the entry loop, so later roots are not walked.
- Warm-up cache misses for non-mesh shaders — Fixed: the warm-up mesh mode now follows the container's own stage — only mesh programs key Emulate, vertex/pixel/compute stay Native as the runtime keys them.
| let ran = AtomicBool::new(false); | ||
| // The mode the runtime translates with on this machine: an emulated | ||
| // mesh shader's cache entry is another key than the native one's, so a | ||
| // warm-up in only the native mode left emulation hardware (no mesh |
There was a problem hiding this comment.
🟡 Ignored warm-up wave size override
When warm targets a different wave size, host creation overwrites VICTORY_HOST_WAVE with the local GPU’s value. The target run then misses the warmed entries.
Devin left this for you to triage: Cross-machine warm-up (warming for a different GPU's wave size) is inherently approximate: the cache key includes the local build fingerprint either way. Same-machine warm-up — the documented flow — is unaffected. Recommend documenting the limitation rather than plumbing target overrides.
Learn more
The warm-up CLI exposes VICTORY_HOST_WAVE so users can match the intended runtime host. The Translate command sets it before starting warm-up. The first host() call initializes the runtime device, whose feature query replaces that same value. The translation fingerprint keys every entry on the resulting wave size.
Example: Set VICTORY_HOST_WAVE=32 on a machine whose device reports 64 lanes, with other cache-key settings matched to the intended run. The warm-up writes entries for 64 lanes, so the 32-lane run translates them again.
Recommended fix: Resolve host capabilities once before spawning workers and apply the explicit warm-up wave override after probing, before building any cache keys. Keep the runtime's hardware-derived setting unchanged.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Three small follow-ups escalated from the round-2 review (#55), each its own commit:
Shader::translatedremembers failures for the rest of the run: a full or read-only cache directory cost every draw of the program. The shader is now returned uncached.VICTORY_WARM_SECONDSexpires the walk stops opening assets instead of scanning every remaining one for workers that break out at once.Test plan
Link to Devin session: https://app.devin.ai/sessions/39a24dfe2c184165b42b2108a96286b6
Open in Devin Desktop: https://app.devin.ai/desktop/session/39a24dfe2c184165b42b2108a96286b6?variant=devin
Requested by: @Personed
👀 Devin fixed 3 findings · 1 finding for you to triage · Follow Devin's work