d3d12: the slow-pipeline line says where the pipeline came from, and whether its journal was written #2634
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2634
Loading…
Reference in a new issue
No description provided.
Delete branch "diag/pipeline-slow-line-source"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as D3D12-PIPELINE-SLOW-LINE-SOURCE.
What and why
The slow-pipeline line exists to answer "why did this take 14 seconds", and today it only says how long. When a pipeline is rebuilt on every boot, the
question that matters is where it came from - the driver, the shared cache, or the per-pipeline journal - and whether the journal then received it. Without
that, a line saying "took 14.0 s to build" cannot be told apart from a cache that never gets written.
This adds three values to the existing line: the source (
shared,journalornone),hit,seededandwritten, so the same line says where the entrycame from and whether this build is going to be found next time.
Tested
python -I scripts/run_semantic_tests.py tests/semantic: 529 files, 6526 tests, 1 file failed -test_interp_computed_ij_fallback, which fails onmaintoday for a reason unrelated to this change (its oracle predates the toward-zerop2narrow);ctest --test-dir runtime/build -C RelWithDebInfo: the runtime builds and its tests run; nothing here changes behaviour, only what one log line prints;seeded 0, written 1- which is how the journal-versus-cache question was answered.GPUs tested
RTX 4090, driver 32.0.16.2124, Windows 11, RelWithDebInfo. No game data is included in this change and none is needed to build it.
The extra commit at the tip (no longer carried)
The branch used to carry
a3b5ebea1(test(semantic): align computed-I/J f16 interp oracle…), added only becausesemantic-testswas red onmainfor that oracle and every branch cut frommaininherited it.mainnow has the same edit asc717967d0, so a rebase drops the commit and this pull request no longer touchestests/semantic/test_interp_computed_ij_fallback.py- the diff is only what this change actually needs.AI-assisted: yes - DeepSeek v4.1 (flash) as the coding agent, with a separate reviewer agent reading the change before submission. Where and on what: the measurements above were taken on Windows 11 with MSVC 19.44.35226 on an RTX 4090 (NVIDIA driver 621.24) where a C++ or GPU path is involved; Python and docs cases need none of it.
Written with an AI assistant.
Rebased onto today's
main(edf0ff5d0) and it now carries the one commit thatmainis missing, like my other pull requests:Why the second commit is here and not only in its own pull request:
semantic-tests (ubuntu-latest)is red onmainfor the interp oracle, so any branch cut frommaininherits that failureand cannot show a green board of its own. #2633 carries the same change; if it lands first, that commit here becomes a duplicate and can be dropped, and if this lands first #2633 becomes a
no-op - either order ends with the same tree.
The runtime still builds with both, which is the only thing this change could have broken (it is one log line in
runtime/shims/d3d12_vulkan_device.cpp).Written with an AI assistant.
A reviewer agent found a defect in this branch that my own check missed, and this commit fixes it. Recording it here rather than quietly amending.
The defect: the new slow-pipeline line replaced the
fprintfand also removedreturn out;, sobuild_compute_pipeline- which returnsComputeBuildby value - fell off the end of a non-void function. Every call that reached the end would have read an uninitialisedComputeBuild.Why my earlier "the runtime builds and its tests run" did not catch it, measured today:
MSVC reports neither warning for this shape - the fall-off is undefined behaviour it does not diagnose at this level - and the tests pass either way, because none of them reaches the completed-build path with a value that exposes the garbage. So "it builds and its tests pass" was true and the code was still wrong. That is the exact failure mode a second reader catches and a build does not.
What this commit changes:
return out;restored where it was, and the new statements dedented to the block they belong to (hit_reportedat the function's declaration level, theifbody and its continuation lines at eight, not twelve). Diff againstmain: 13 insertions, 12 deletions, one file - same file, same intent, no behaviour change beyond removing the UB.Also corrected after the same review: the body said the line prints "(
shared,journalornone)"; the code prints"a compile","the shared cache"or"its journal file". The code is right; the sentence is the one that was wrong, and it stays wrong in the paragraph above if I edit only the code - so treat the code as the description.Written with an AI assistant.
Correction to what I wrote here an hour ago, and it is about my instrument rather than the code: MSVC DID report this, and my check filtered it out.
I wrote that "MSVC at /W4 reports neither C4715 nor C4716 for this shape". That is false. Reproduced just now on the original commit of this branch (
37a825340, before the fix):So the compiler said exactly where and what, at
/W4, on the first build. My command grepped the output for: error- and once forC4716, which is a different code - so the one line that named the defect was thrown away by the filter I wrote to look for it.Why this correction matters more than the defect: I reported "the compiler stayed silent" as a finding about MSVC, and it was a finding about my grep. The instrument worked; I read the wrong dial. Had I trusted the tool and not my filter, the defect would have been caught before the pull request, and the reviewer agent would have had nothing to find.
What the fix does not change: the commit before this one stands - the
return out;is restored and the statements are indented with their block. Only the story about why it slipped through changes.And the general form, which is the third time today this shape has bitten me: a filter that looks for one kind of evidence cannot tell you what it discarded.
grep ': error'on a compiler's output must begrep 'error\|warning C4715\|warning C4716', or better, no grep at all until the build's own summary is read.Written with an AI assistant.
Verified: CI, no-game-data, Windows runtime, Linux GPU tools, viewer and semantic checks are green after the reviewer-found return fix. Ready for merge.