You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation relies on adding the dependency chain of the invariant variable (i.e, position) to the forced_temporary group. This already splits a lot of operations reducing the chances of divergencies, but it's not enough for complex setups.
In our use case, the spirv-opt output has divergencies on different stages, splitting one particular operation on one stage (i.e., 961 - (_958 * dot(_961, _958))) into temporaries, while keeping it inlined on the other stage.
When passing the produced spirv through spirv-cross the invariant decoration current behaviour keeps the divergences generating glitches.
The only solution I came up to have some sort of working code is:
propagate decorationInvariant through the dependency chain
use decorationInvariant in the same sense as decorationNoContraction in emit_binary_op/emit_binary_op_func (i.e., the latter is used by spirv_msl when outputting spvXXX functions)
This is for sure not a complete solution, and I don't know if that approach could even be considered adequated for merging at certain point, or for further investigation.
I'd appreciate any hints/opinions.
Cheers.
The text was updated successfully, but these errors were encountered:
The current implementation relies on adding the dependency chain of the invariant variable (i.e, position) to the forced_temporary group. This already splits a lot of operations reducing the chances of divergencies, but it's not enough for complex setups.
In our use case, the spirv-opt output has divergencies on different stages, splitting one particular operation on one stage (i.e., 961 - (_958 * dot(_961, _958))) into temporaries, while keeping it inlined on the other stage.
When passing the produced spirv through spirv-cross the invariant decoration current behaviour keeps the divergences generating glitches.
The only solution I came up to have some sort of working code is:
This is for sure not a complete solution, and I don't know if that approach could even be considered adequated for merging at certain point, or for further investigation.
I'd appreciate any hints/opinions.
Cheers.
The text was updated successfully, but these errors were encountered: