[PATCH] D124981: [AMDGPU] Enable WQM if demotes and softwqm are combined

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 04:52:27 PDT 2022


critson added a comment.

I think there is perhaps another way to see this.

>From the specification for SPV_EXT_demote_to_helper_invocation:

> Demote fragment shader invocation to a helper invocation. [...]
> The implementation may terminate helper invocations before the end of the shader as an optimization, but doing so must not affect derivative calculations and does not make control flow non-uniform.

One way to read this is that //demote// should **always** create helper lanes, i.e. demote should always run WQM.
Our implementation doesn't do this and instead executes //demote// as a kill outside WQM regions.
In sense this is actually fixing an issue with the //demote// implementation, rather than with //softwqm//.

I agree with the description of //softwqm// as a "weak observer", but //demote// is suppose to be a strong source of observable derivatives.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124981/new/

https://reviews.llvm.org/D124981



More information about the llvm-commits mailing list