feat(rocke): add scalar optimization barrier APIs - #12165
Draft
tenpercent wants to merge 2 commits into
Draft
tenpercent wants to merge 2 commits into
tenpercent wants to merge 2 commits into
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
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.
ISSUE ID : AICK-2253
Kernel authors sometimes need an intermediate floating-point result to round before the next operation. Combining a multiply with an add or FP16 conversion can change that result.
Add
IRBuilder.optimization_barrier(value)androcke_b_optimization_barrier(builder, value). They return the same scalar value and type while preventing the compiler from combining operations across it. The implementation uses the existing inline-assembly operation; booleans and byte-sized values widen toi32and then return to their original type.This PR targets
developindependently of the FP4 and NVFP4 work. It includes dedicated Python/C parity emitters, scalar bit-preservation and rounding tests, and documentation linked from the API index. The guide explains supported types, use of the returned value, and the difference fromsched_barrierand memory/thread synchronization.Validation: