Skip to content

quad-or-derivative-in-thread-launch-node

Status: stub. The full-length analysis is queued for a v1.0.x patch release per ADR 0018, section 5, criterion #6. The companion rule page at docs/rules/quad-or-derivative-in-thread-launch-node.md contains the canonical detection logic + GPU reasoning.

TL;DR

Work graphs offer three node launch modes: broadcasting (one thread group per record, like compute), coalescing (multiple records folded into one thread group), and thread (one thread per record). The thread-launch mode is the most flexible for fine-grained dispatch but it explicitly does not guarantee the quad-coupled execution that pixel-shader-style derivatives and quad intrinsics require. There is no rasterizer feeding 2x2 quads of co-located lanes; there is no helper-lane mechanism; there is no guarantee that any group of four lanes in a wave correspond to anything spatially or logically related. A QuadReadAcrossX issued in a thread-launch node reads from a "quad neighbour" that the runtime has no obligation to make meaningful.

What the rule fires on

Work-graph nodes declared with [NodeLaunch("thread")] (thread-launch nodes, where each input record produces a single thread invocation rather than a thread group) that contain quad-scoped intrinsics (QuadAny, QuadAll, QuadReadAcrossX, QuadReadAcrossY, QuadReadAcrossDiagonal, QuadReadLaneAt), explicit derivatives (ddx, ddy, ddx_fine, ddx_coarse, ddy_fine, ddy_coarse), or implicit-derivative texture sampling (Texture2D::Sample, SampleBias, SampleCmp). All of these require quad-coupled execution that thread-launch nodes do not provide.

See the What it detects section of the rule page for the full pattern definition.

Why it matters

The full GPU-mechanism analysis lives in the Why it matters on a GPU section of the companion rule page.

Examples

The bad / good code snippets are kept canonical on the rule page; see quad-or-derivative-in-thread-launch-node.md -> Examples.

See also


This is a v1.0-ship stub. Full analysis pending; track issue link TBD.

© 2026 NelCit — Apache-2.0 (code), CC-BY-4.0 (docs).