Open
Conversation
7f70902 to
d8601a4
Compare
19706c7 to
eacf966
Compare
This change adds logic to support emission of loops into QIR when use the `Adaptive_RIFLA` profile. The strategy employed uses changes to both RCA and Partial Evaluation to accomplish this. In RCA, we add a new check that identifies loops whose condition is marked as static and speculatively marks them as dynamic to compute what capabilities they would require at runtime. If the resulting capabilities are compatible with the current target, the loop remains dynamic, otherwise the RCA state is reset and the loop is marked as the originally analyzed static. In Partial Evaluation, new support for dynamic loops is added, where a loop marked as dynamic is emitted as a sequence of blocks with appropriate backward branches to capture the while-loop structure. This change includes new unit tests to verify analysis and emission of loop structures into RIR and new integration tests to verify the whole program stucture and execution of QIR v2 with loops via qir-runner.
eacf966 to
0dcb9de
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change adds logic to support emission of loops into QIR when use the Adaptive_RIFLA profile. The strategy employed uses changes to both RCA and Partial Evaluation to accomplish this.
In RCA, we add a new check that identifies loops whose condition is marked as static and speculatively marks them as dynamic to compute what capabilities they would require at runtime. If the resulting capabilities are compatible with the current target, the loop remains dynamic, otherwise the RCA state is reset and the loop is marked as the originally analyzed static.
In Partial Evaluation, new support for dynamic loops is added, where a loop marked as dynamic is emitted as a sequence of blocks with appropriate backward branches to capture the while-loop structure.
This change includes new unit tests to verify analysis and emission of loop structures into RIR and new integration tests to verify the whole program structure and execution of QIR v2 with loops via qir-runner.