-
Notifications
You must be signed in to change notification settings - Fork 302
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
[RTG] Add ElaborationPass #7876
base: maerhart-rtg-test-and-target
Are you sure you want to change the base?
[RTG] Add ElaborationPass #7876
Conversation
36dfd4c
to
2633cab
Compare
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.
Will keep looking tomorrow, its looking great! 😁
newTest.setSymName(test.getSymName().str() + "_" + | ||
target.getSymName().str()); |
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.
Could this cause a name collision? You can use the SymbolTable to help generate unique symbols
// If the test requries nothing from a target, we can always run it. | ||
if (test.getTarget().getEntryTypes().empty()) | ||
continue; |
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.
So if a test does not have any requirements we won't run it on each target, just once in general?
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.
There are two things to consider:
- The unelaborated test is the same for all targets, so do we want to randomize it once for each target or randomize it once and use that for each target? If the latter, then we don't have to copy it. But I guess the earlier approach would be the more consistent one, right?
- Currently I assume that all tests for all targets will be run on the same system because there is no way to distinguish them after this pass. If we want to have targets for different systems in the same MLIR file, we'd need some scoping, add the target that the test specialized for as an attribute, or some other way to distinguish them. As long as we don't do that, we don't need to duplicate a test that has the same content.
I guess I will change it to be copied and independently randomized for each target, but leave point 2 for a future PR.
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.
I don't really know whats best, what you had originally is probably good! We can revisit these points in the future easily enough.
506937f
to
14a434c
Compare
2633cab
to
b89ad7c
Compare
Add a pass that lowers the random parts of RTG IR.