Repository navigation
d3d12: the slow-pipeline line says where the pipeline came from, and whether its journal was written - #2634
Conversation
|
Rebased onto today's Why the second commit is here and not only in its own pull request: The runtime still builds with both, which is the only thing this change could have broken (it is one log line in Written with an AI assistant. |
55108e1 to
37a8253
Compare
…as written The slow-pipeline line reported ook N s to build for a timer that starts before the journal file is read and before the shared cache is asked, so it named a compile for what could be a cache lookup. Chasing a compile cost from it is chasing the wrong number: a run with 16 such lines had compiled exactly one pipeline. The line now names the source (a compile, the shared cache, or the pipeline's own journal file) and carries the hit the journal reported, whether its cache was seeded from a file, and whether the file was written afterwards. That is what turned three contradictory readings of the same log into one, on an RTX 4090 with a warm journal: 23 slow lines, all hit 0, seeded 0, written 1 - first-sight pipelines, each compiled once and journaled.
…ines The slow-pipeline line replaced the fprintf but also removed the function's return out; - the body then fell off the end of a non-void function. MSVC at /W4 reports neither C4715 nor C4716 for this shape and the build stays green, so the caller would have read an uninitialised ComputeBuild; the test suite does not distinguish the two, which is why the earlier build-based check missed it. Restored, and the new statements dedented to the block they belong to.
37a8253 to
e3af360
Compare
|
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 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: Also corrected after the same review: the body said the line prints "( 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 ( So the compiler said exactly where and what, at 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 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. 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. |
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.