Repository navigation
L post filter (D3D12 direct): each lane finishes its own channel before the lane gather - #240
Merged
Merged
Conversation
…-exposure scale, FP16 rounding) before the lane gather; PF_MUT 1 negative control 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.
Draft. Speed change to Model L's output filter on the direct route (
clean/dx12/kernels/post_filter.hlsl, kernelsl_post_filter_directandl_post_filter_direct_ldr). It is byte-identical to HIP, and no rounding changes.What changes
Before this change, the lane of channel 0 gathered channels 1 and 2 from the next two lanes, then applied the pre-exposure scale and the FP16 rounding to all three values. Now each lane finishes its own channel value first (
native_direct_scalewhen the pre-exposure is not 1,fd_halfwhenoutput_rne16is set), and channel 0's lane gathers the finished values. It is the same function on the same values, computed once per lane instead of three times on one lane.PF_MUT 1is a negative control (never shipped): only channel 0 is rounded.Idea and first measurement: S-FABLE-GPU-RESULTS ("fo").
Results
Store check (
clean/dx12/tests/post_tf_d3d12_check.py --store): the direct filter's RGBA16F texture (pre-filled with 0x5A, so every texel must be written) and its RGBA32F texture, against HIP's output-copy rows and FP32 output, raw bytes:--store --ldr): 20/20 identical, incl. 1098 ties, 28176 values past 65504 and 44042 in the FP16 subnormal range.PF_MUT 1: caught, 8/26 (HDR) and 4/20 (LDR) cases identical.Timing on the direct route (test_interop_d3d12 hipbench, executor dx12, runtime timing log), 1440p Quality, synthetic L model, 5 interleaved rounds. The base is the same runtime library with main's kernels:
Paired rounds: -11.5 to -29.5 us, median -16.5 us.
Tested
Not tested