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
We should probably remove the check all-together and let spirv-val validate the kernels before we run them with dartagnan. I can add a new compilation pipeline rule which would do this for spvasm inputs.
I wanted to comment about this yesterday but held back on it. I was always under the impression that Dartagnan might be doing too many basic validity checks that should never fail unless the SPIRV code was handwritten as the SPIRV-generating frontend should be doing those checks already. I mean, having those (redundant?) checks is not bad but it takes quite a bit of effort to get them all right for practically little benefit.
In the case of this PR, the checks for wrong labels/jumps is not even semantically relevant, i.e., it seems like an arbitrary syntactic restriction (there is probably a legitimate reason for the restriction though).
was always under the impression that Dartagnan might be doing too many basic validity checks that should never fail unless the SPIRV code was handwritten as the SPIRV-generating frontend should be doing those checks already.
Writing SPIRV manually is a valid way of doing it (AFAIR Natalia has done this many times). Also, we should not rely on a generator having checks (I have seen generators getting it wrong). However, spirv-tools has a validator which should have most up-to-date rules in place, so the best way would be to use it.
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
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.
The rule is only valid from SPIRV 1.6 onwards, thus we are currently rejecting perfectly valid kernels.