Repository navigation
Conversation
Reuse completed probe results per GPU registry ID and MSL version to avoid repeated compiler stalls during adapter enumeration. Retry incomplete probes and unidentified devices, and deduplicate concurrent requests without holding the global cache lock during compilation. Add coverage for reuse, key isolation, retries, and concurrent requests. Fixes gfx-rs#10742. Depends on gfx-rs#10731. AI assistance: implementation, tests, validation, and description prepared with an AI coding agent at the contributor's request.
ITJamie
force-pushed
the
codex/intel-metal-probe-cache
branch
from
October 26, 2026 20:17
aabd656 to
6a851c4
Compare
ITJamie
marked this pull request as ready for review
October 26, 2026 20:20
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connections
Depends on #10731. Fixes #10742.
Description
Repeated adapter enumeration reruns the Intel workgroup-size compiler probe. On an OCLP Intel Iris Pro Mac, subsequent rejected probes take about 30.5 seconds each, making renderer recovery very slow.
Cache completed results per GPU registry ID and selected MSL version for the lifetime of the process. Concurrent requests for the same key share one probe; incomplete probes and devices without a usable registry ID are retried. The existing compiler workaround and shader bounds checks remain enabled.
This branch contains #10731's prerequisite commit plus one cache commit. The cache is the separate follow-up; rebase onto
trunkafter the prerequisite lands.Testing
wgpu-halClippy, and four cache unit tests: passed. Tests cover both result values, GPU/MSL isolation, incomplete/unidentified retries, and concurrent requests.cargo xtask testran 1,144 tests: 1,140 passed, four failed, six skipped. Failures are listed below; this is not a clean full-suite pass. Notrunkbaseline or CTS run.Validation failures and corrections
The four remaining full-suite failures:
wgpu_gpu::subgroup_operations::subgroup_operations: expected-backend-failure mismatch on Apple M4 Max; not baseline-validated.wgpu_gpu::passthrough::all_passthrough_shaders_binaryandall_passthrough_shaders_source: missing DXC.wgpu_gpu::passthrough::metallib_passthrough_shader: missing offlinemetal/metallibtools.An earlier full run had six additional missing-SPIR-V-tool failures:
snapshots::convert_snapshots_spv,snapshots::convert_snapshots_wgsl, andspirv_debug_info::{embedded_nul_at_word_boundary, clean_label_validates, embedded_nul_in_file_name, embedded_nul_in_source_code}. All six passed after adding the already-installed tools to PATH.Initial targeted checks caught a missing test
Vecimport, formatting, optional-value propagation, andstdimports that should usecore/alloc; these were corrected before the final checks.Squash or Rebase?
Keep the cache change as one commit after #10731 lands, rebased onto
trunk.LLM Use?
An AI coding agent investigated the stall, wrote the cache and tests, ran validation, and wrote this description at the contributor's explicit request. Contributor review and ownership are still required; the self-review checkbox is intentionally unchecked.
Checklist
CHANGELOG.mdentries for the user-facing effects of this change are present.