This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Modify and add new pipeline shader option#1338
Merged
JaxLinAMD merged 2 commits intoGPUOpen-Drivers:devfrom Aug 10, 2021
Merged
Modify and add new pipeline shader option#1338JaxLinAMD merged 2 commits intoGPUOpen-Drivers:devfrom
JaxLinAMD merged 2 commits intoGPUOpen-Drivers:devfrom
Conversation
Test summary for commit 3cfbaeeDriver commits used in build
CTS tests (Failed: 0/228188)
Rhel 8.2, Gfx10Ubuntu 18.04, Gfx9Ubuntu 20.04, Gfx8Ubuntu 20.04, Gfx103 |
Contributor
|
As we discussed locally, this could be a HW problem of FMA. Consider if you still need this option. |
Contributor
|
@jiaolu there are lgc test failures: |
fe6bb3c to
04d6829
Compare
amdrexu
previously approved these changes
Aug 9, 2021
1. Refactor SPIRVGenFastMath option to enable more fastmathflag setting through -spirv-gen-fast-math in llpcOptions 2. Add new shader pipeline option to disable contract fastmath flag for the dot product Fastmath contract flag could generate v_fma_f32 in the dot product function. fma in the dot function somehow has some errors. v1:-0.499996 -0.374997 -0.999991, v1:0.110096 -0.110096 -0.013762 dot(v0,v1) before: c++: 0x31000000 float:1.86265e-09 llpc: 0xAFB54C20 float:-3.29778e-10 after: llpc: 0x31000000 float:1.86265e-09 sp3 code: before: v_mul_f32 v2, v6, v2 v_fma_f32 v0, v4, v0, v2 v_fma_f32 v0, v8, v10, v0 after: v_mul_f32 v0, v4, v0 v_mul_f32 v2, v6, v2 v_mul_f32 v4, v8, v10 v_add_f32 v0, v0, v2 v_add_f32 v0, v4, v0
Test summary for commit 04d6829Driver commits used in build
CTS tests (Failed: 0/228724)
Rhel 8.2, Gfx10Ubuntu 18.04, Gfx9Ubuntu 20.04, Gfx8Ubuntu 20.04, Gfx103 |
amdrexu
previously approved these changes
Aug 9, 2021
Test summary for commit a45af42Driver commits used in build
CTS tests (Failed: 2/228724)
Rhel 8.2, Gfx10Ubuntu 18.04, Gfx9Ubuntu 20.04, Gfx8Ubuntu 20.04, Gfx103 |
amdrexu
approved these changes
Aug 9, 2021
Test summary for commit 18e13b3Driver commits used in build
CTS tests (Failed: 0/228724)
Rhel 8.2, Gfx10Ubuntu 18.04, Gfx9Ubuntu 20.04, Gfx8Ubuntu 20.04, Gfx103 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
through -spirv-gen-fast-math in llpcOptions
the dot product
Fastmath contract flag could generate v_fma_f32 in the dot product
function.
fma in the dot function somehow has some errors.
v1:-0.499996 -0.374997 -0.999991, v1:0.110096 -0.110096 -0.013762
dot(v0,v1)
before:
c++: 0x31000000 float:1.86265e-09
llpc: 0xAFB54C20 float:-3.29778e-10
after:
llpc: 0x31000000 float:1.86265e-09
sp3 code:
before:
v_mul_f32 v2, v6, v2
v_fma_f32 v0, v4, v0, v2
v_fma_f32 v0, v8, v10, v0
after:
v_mul_f32 v0, v4, v0
v_mul_f32 v2, v6, v2
v_mul_f32 v4, v8, v10
v_add_f32 v0, v0, v2
v_add_f32 v0, v4, v0