-
Notifications
You must be signed in to change notification settings - Fork 61
Create workflow for verifying xDSL dialects against their MLIR versions #2392
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
base: main
Are you sure you want to change the base?
Conversation
|
Hello. You may have forgotten to update the changelog!
|
|
@ reviewers should I fix the CodeQL warnings? EDIT: Added, since it's good practice anyway. |
|
@mehrdad2m I'm wondering if running the workflow on every unified compiler PR makes sense. I feel like it might be overkill, especially since we have very few PRs that update dialects. Maybe it makes more sense to run it on a schedule instead. What should the frequency of the schedule be in that case? I would say at least once a week. |
Yeah I agree, a per PR run is definitely an overkill. Once a week is more than enough. |
Added a workflow that verifies parity between xDSL and MLIR dialects. The workflow does the following:
create_xdsl_dialects.pyscript (more details below)verify_xdsl_dialects.pyscript (more details below)Two scripts were added to support this workflow:
create_xdsl_dialects.py: This script creates xDSL dialect files for the dialects that we are verifying:llvm-tblgento generate a JSON file.llvm-tblgenis available to us because we download the cached LLVM build, which contains the executableDialectfield, which may sometimes contain multiple dialects, and removes the assembly format, since we won't be validating that anyway.xdsl-tblgento use the cleaned up JSON to create Python files for the dialects. These files are not usable out of the box, so some changes are needed.UnitAttrfields, I'll explain later) are removed.UnitAttrfields are updated such that their constraint isAnyAttr()UnitAttrfields are updated to use the standardized format ofopt_prop_def(UnitAttr)oropt_attr_def(UnitAttr). This is needed so that the verification is simpler.verify_xdsl_dialects.py: This script uses the dialects generated above to verify the xDSL dialects in Catalyst.UnitAttrs, it checks that they are defined as optional properties or attributesThis workflow caught some issues with the Catalyst and QEC dialects, which are also fixed in this PR.
Miscellaneous changes:
.ymlsuffix instead of.yaml. This is already standardized across PL and Lightning.I added the wheels build label so that all workflows run. I just want to make sure that the
.yaml->.ymlchange didn't screw anything up. I'll remove the wheel builds once they pass at least once.[sc-98908]