Repository navigation
Model L own post: previous exposure by its reciprocal (HIP + D3D12), speed levers and floor (Q5) - #169
Merged
Conversation
… D3D12) L_i = D(H_i) r_prev with r_prev = 1 / e_prev (one IEEE division per launch) instead of D(H_i) / e_prev per channel and candidate, in l_post.hip and its D3D12 port l_post.hlsl alike. The spec answer Q5 (preset L part 3, section 1) lists the division by the weight total or the exposure as a product with the reciprocal as free within Model L's post tolerance. The D3D12 port drops its correctly rounded division window (ep_window / ep_div3). Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
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.
Refs #89
Model L's own post (
l_post=own), speed step 3: the reordering levers allowed by the spec answer Q5, measured one byone. One lever is kept. Everything else came out neutral or slower, so this PR also gives the floor breakdown of
l_post_recon_p12for oversight.Base: main (after #167, merge 069827e).
Change (HIP and D3D12 together)
L_i = D(H_i) · r_prevwithr_prev = 1 / e_prev(one IEEE division per launch). This replacesD(H_i) / e_prevperchannel and candidate.
clean/l/kernels/l_post.hip(l_post_core) and in its D3D12 portclean/dx12/kernels/l_post.hlsl.ep_window/ep_div3): −5.6 KB of ISA.by the weight total instead of × reciprocal" and "exposure removal by true division" are both listed as free:
0 values more than 1 ulp off on the spec's frames. No order that Q5 marks as a fact is touched: the gather, the
history partial sums and the 5-read form, the ranking, the 1/255 cut-off, the blend form, the NaN guard and the
special values all stay as they are.
post.hipand every M HLSL file are unchanged.Records (GPU, gfx1201)
New HIP against Model L's oracle,
l_post_check.py --seeds 6, 60 cases:the same cases.
l_post.coon those 60 cases: 0 output bytes differ (history, display, reduced). The previousexposure there is random in [0.5, 2]. The 1-ulp FP32 differences of the product do not survive the FP16 / code
rounding on these cases.
New HIP on all frames (
l_frame_check.py --compare, 11 frames, Model L post acceptance): L pass, M pass. Thedefault kernels against the six-launch bottleneck: 11 of 11 identical, negative controls caught.
D3D12 byte-identical to the new HIP:
l_d3d12_ops_check.py --seeds 6:l_post_recon72 of 72 andl_post_recon_p1272 of 72 identical, 0 differing bytes;swin_block_c96_nc36 of 36;l_d3d12_own_post_check.py(raw bytes; sentinels HIP 0xA5 / D3D12 0x5A / D3D12 stages 0x3C):Model M DXILs unchanged: the M fused posts (
w64/post_tf*,pmo/post_tf*, buffer and direct forms) andswin_block_c96_ncwere rebuilt from this tree: 15 of 15 DXILs byte-identical to main's.Timing (
l_d3d12_profile.py, 200 frames, two alternating runs each,l_post_recon_p12ms per frame):Levers measured and not kept (D3D12, 1080p Quality, same build, base 0.588–0.590 ms; noise about ±0.01 ms)
v_pk_fma_f16already pair the two rows' half accumulators.selectof polynomial and exponential, with the reciprocal)Floor breakdown (1080p Quality)
a gap of about 0.33 ms.
part, so the parts overlap and do not add up.
against real motion.
Cl)log2of history and display)Against Model M's fused post: 9 taps instead of 16, one Catmull-Rom in the encoded domain instead of up to two
per row with per-candidate decode, and the filter fused. Each difference is a spec fact of Model L, not an
implementation choice. With every lever above measured, I see no free reorder left that is worth more than about
0.01 ms. Reaching about 0.1 ms of the fused post would need changes to the facts in the table.
Tested / Not tested
above); the native direct test (the change is inside
l_post_recon_p12, which both routes run unchanged).Update: on main after #167 (merge 069827e)
Main also brought #168 (
WG_REV_ORDERinwg_platform.hlsli, reverse workgroup order forl_swin_block_c32_enc_nc).The header change is preprocessor-only for kernels that do not set it:
l_post_reconandl_post_recon_p12rebuilt onthe merged tree are byte-identical to the DXILs of the records above, so the oracle, ops and timing records stand.
Frame record re-run on the merged tree (with #168's encoder), raw bytes: against the HIP run 11 of 11 identical, 28
outputs, 0 differing, negative controls 4 of 4 caught; per stage against the reference 11 of 11; default against
stages 11 of 11 identical. Leak scan 0 hits; public gates at the baseline.