Repository navigation
Frame generation: net1 max-pool kernel for HIP and D3D12, bit for bit against the CPU reference - #187
Merged
Merged
Conversation
… against the CPU reference fg_maxpool2_f16 (fg_net1.co) and its D3D12 port clean/dx12/kernels/fg_pool.hlsl: 2x2, stride 2, floor sizes, the delivered step m <- (x > m) x + (x <= m) m with IEEE products and sums, as shared integer code (fg_pool_step16 in clean/fg/kernels/fg_exact16.h). Built only with --only, as every fg_ kernel. fg_d3d12_check.py: pool cases (random maps of several sizes, every window of four taps over ten special values) and a caught half-grid negative control per kernel. Refs #96 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
marked this pull request as ready for review
November 14, 2026 18:50
Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
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.
Adds the second frame-generation GPU kernel family: net1's max-pool, for HIP and D3D12, byte-identical with each other and bit for bit against the CPU reference
net1.maxpool2(lane h). It builds on #183 (the conv kernel, the shared header and the check, now merged).Kernel:
fg_maxpool2_f16(x, y, C, H, W)inclean/fg/kernels/fg_net1.hip(code objectfg_net1.co), with its D3D12 portclean/dx12/kernels/fg_pool.hlsl.m ← (x > m)·x + (x ≤ m)·mwith IEEE products and sums: 0·inf is NaN, and a sum of zeros is −0 only when both are −0.fg_pool_step16, integer bit logic in the sharedclean/fg/kernels/fg_exact16.h, so both back ends run the same code. NaN is written as0x7E00.fg_kernel it is built only when--onlynames it, so Model M's and Model L's kernel sets and DXILs are unchanged.Check (
clean/fg/runner/fg_d3d12_check.py)Refs #96
Tested
gpu_slot.py --cap-s 170), three seeds, with the conv kernel in the same run: 285 cases (21 pool, 264 conv) and 1,873,263 output values.0xA5/0x5A).test_kernel_sets, theclean/fgunit tests, the line-ending check and the public gates pass, with no hits in the changed files.Not tested