0.6.6: follow-ups from the k_approx review (#257)

Open
#262 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
backend, testing

Research direction

Start with the six follow-ups in this issue and inspect the named shader file, clean/k/dx12/hlsl/k_out.hlsli, plus the preparation, executor, mode-line, frame-note, and release-diagnostics code they refer to. First trace how selected variants are prepared and how runtime options reach Model K; then review each item’s tests and evidence requirements. Done means the six gaps are fixed or documented as requested, with focused tests or committed synthetic-data summaries for the relevant claims.

Written by the indexing model from the issue text.

Description

Follow-ups from the review rounds of #257 (Model K: the k_approx opt-in close approximations a1 and a2). They are tracked here for 0.6.6; none of them changes the default (nothing set) output.

1. Preparation of a selected form with an unsupported root signature

An otherwise valid manifest can declare a selected approximate form (for example k_out_pixel_c__a2) with a root signature the native device does not support. The loader accepts it, the create-time preflight checks only the name and code object, and preparation returns success without loading the shader, so create succeeds and the first launch fails. Make preparation fail for an unsupported signature or an unmatched variant, and test that malformed selected entry. (The same preparation gap is item 2 of #261.)

2. Non-vacuous selection tests

The approximation test never asserts the k_out_color__a2 launch: replacing only that selection with the exact colour kernel would still pass. The executor matrix reads back no output bytes. Assert every expected approximate launch and the absence of its exact counterpart, for buffer and direct frames and for each tag on its own. Compare direct-route frames byte for byte where an exact reference applies.

3. Mode line with a very long options variable

If the runtime options environment variable exceeds the interop parser's 4095-character limit, the front end reports that it ignored the value, while Model K reads the full variable independently and enables the approximation. The mode line can then say "exact". Derive the mode line from the runtime's effective selection, or use one options source, and test the long-value case.

4. Claims without committed records

A comment in clean/k/dx12/hlsl/k_out.hlsli states a one-ULP maximum and a difference rate for six seeds, and the PR description cites a shader-identity record and an executor negative-control record. Neither record is in the repository. Commit constructed-data summaries for these (synthetic inputs only), or qualify the claims.

5. Frame-note threading contract

wg_rt_take_frame_note hands over the same per-context note a frame can write, without synchronization. The executor calls it synchronously after a frame, which is safe, but the contract is not written down. Document that frame calls and note calls on one context must not run concurrently, or synchronize them.

6. The k_fill test option in release builds

The k_fill option fills Model K buffers with a test pattern and is accepted in release builds; it predates #257. Limit it to developer builds, as the other test hooks are, and add it to the release diagnostics check.

Dominant language
C++
Stars
12
Forks
2
Avg merge
3h 10m
Merged PRs (30d)
171

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phantoslayer21/wronggpu

All issues in phantoslayer21/wronggpu

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.