-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dialect Conversion #20
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
05a17d1
Add poly-to-standard lowering pass shell
j2kun d9bcf1f
Add conversion target
j2kun 3421df1
add poly type converter
j2kun 78bf9a5
add empty lowering for poly.add
j2kun bf9fbc9
lower poly.add
j2kun 25b284b
add structural conversion helpers for func, etc.
j2kun 191b7b0
add poly.to_tensor op
j2kun e99916b
lower poly sub, to_tensor, from_tensor ops
j2kun b8c4d86
lower poly.constant
j2kun 46aa345
lower poly.mul as a naive loop
j2kun 06de5d2
Lower poly.eval
j2kun 46ff536
add CMake build files
j2kun b8f089b
add a test that chains together many poly ops
j2kun edf22e4
demonstrate what a materialization would involve
j2kun c3a8384
Revert "demonstrate what a materialization would involve"
j2kun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: tutorial-opt --poly-to-standard %s | FileCheck %s | ||
|
||
// CHECK-LABEL: test_lower_add | ||
func.func @test_lower_add(%0 : !poly.poly<10>, %1 : !poly.poly<10>) -> !poly.poly<10> { | ||
// CHECK: arith.addi | ||
%2 = poly.add %0, %1: !poly.poly<10> | ||
return %2 : !poly.poly<10> | ||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{addOp}
will trigger ambiguous error in LLVM 20, so this can be implemented in this way: