-
Notifications
You must be signed in to change notification settings - Fork 759
Intrinsics ddx_fine/ddy_fine should not be allowed to sink into flow control #5744
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
Milestone
Comments
hekota
added a commit
to hekota/DirectXShaderCompiler
that referenced
this issue
Sep 18, 2023
Add `-opt-disable sink` to HelperLaneTest shader compilation to prevent sinking of `ddx_fine`/`ddy_fine` intrinsics into flow control. Separate issue has been filed to track down the root of the problem: microsoft#5744: Intrinsics ddx_fine/ddy_fine should not be allowed to sink into flow control
Merged
hekota
added a commit
that referenced
this issue
Sep 20, 2023
Add `-opt-disable sink` to HelperLaneTest shader compilation to prevent sinking of `ddx_fine`/`ddy_fine` intrinsics into flow control. Separate issue has been filed to track down the root of the problem: #5744: Intrinsics ddx_fine/ddy_fine should not be allowed to sink into flow control
llvm-beanz
pushed a commit
to llvm-beanz/DirectXShaderCompiler
that referenced
this issue
Sep 21, 2023
Add `-opt-disable sink` to HelperLaneTest shader compilation to prevent sinking of `ddx_fine`/`ddy_fine` intrinsics into flow control. Separate issue has been filed to track down the root of the problem: microsoft#5744: Intrinsics ddx_fine/ddy_fine should not be allowed to sink into flow control
hekota
added a commit
to hekota/DirectXShaderCompiler
that referenced
this issue
Sep 21, 2023
Add `-opt-disable sink` to HelperLaneTest shader compilation to prevent sinking of `ddx_fine`/`ddy_fine` intrinsics into flow control. Separate issue has been filed to track down the root of the problem: microsoft#5744: Intrinsics ddx_fine/ddy_fine should not be allowed to sink into flow control
hekota
added a commit
that referenced
this issue
Sep 22, 2023
Add `-opt-disable sink` to HelperLaneTest shader compilation to prevent sinking of `ddx_fine`/`ddy_fine` intrinsics into flow control. Separate issue has been filed to track down the root of the problem: #5744: Intrinsics ddx_fine/ddy_fine should not be allowed to sink into flow control
I am hitting this problem, is there any known workaround? |
The compile flag |
This was referenced Oct 22, 2024
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Description
Intrinsics ddx_fine/ddy_fine should not be allowed to sink into flow control. That can currently happen because they are marked
ReadNone
same as other unary ops, but they are reading values from neighboring threads in the same quad.Steps to Reproduce
tools/clang/unittests/HLSLExec/ShaderOpArith.xml
, find data forHelperLaneTestNoWave
and remove-opt-disable sink
from the shader compile arguments.hcttest exec-filter *HelperLaneTest -verbose -adapter NVidia*
Actual Behavior
Expected Behavior
More info
This shader code
is optimized into code equivalent to
The
ReadAcrossDiagonal_DD
function is reading a value from neighboring thread in the same quad. That value has not been calculated because this call andReadAcrossY_DD
got moved under theif
flow control and did not execute on all threads in the quad.Environment
The text was updated successfully, but these errors were encountered: