Skip to content
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

CI: Add MLIR-based CI #243

Merged
merged 1 commit into from
Nov 30, 2022
Merged

CI: Add MLIR-based CI #243

merged 1 commit into from
Nov 30, 2022

Conversation

webmiche
Copy link
Collaborator

@webmiche webmiche commented Nov 29, 2022

This PR adds a CI for our MLIR-based tests. There are a couple of things to mention here:

  • On PRs/Pushes on main, this workflow is triggered.
  • From the MLIR repo, only the commit we want is cloned (no history, no branches). This commit is hardcoded in the Clone MLIR part of the workflow.
  • The workflow uses CCache for gh actions to cache compiled files. This cache is saved on the github action cache and restored each time before trying to rebuild. This way, I managed to get the execution time down from around 2h (here) to 10min.
  • If we need to, this cache can be cleaned by following this.
  • Notice that the compiled files need to be linked again for each execution. I moved to clang with LLD to speed this up.
  • If we want to speed this CI job up further, we could pre-compile the mlir-opt executable and pull it in each time. Though notice that this will need manual recompilation if we decide to update the commit hash for the CI, whereas the current version does this fully automatically.
  • Another potential timesave is that only mlir-opt is compiled. This reduces the amount of files needed to be cached and linked for each execution.
  • Notice that this CI job only runs the tests in tests/filecheck/mir-conversion/with-bindings as all others are already run in the Python-based Testing job. Please indicate if anyone wants this to be different.
  • Currently, the ninja installation seems to have issues with nodes that are deprecated. I am piggybacking off of some of googles repos, so I am assuming that they will update this, when it becomes really necessary. Still, we should keep this in mind.

@webmiche webmiche added the CI Continuous Integration label Nov 29, 2022
@webmiche webmiche self-assigned this Nov 29, 2022
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Base: 81.48% // Head: 81.48% // No change to project coverage 👍

Coverage data is based on head (bf2f86a) compared to base (d7e318c).
Patch has no changes to coverable lines.

❗ Current head bf2f86a differs from pull request most recent head aa861c6. Consider uploading reports for the commit aa861c6 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #243   +/-   ##
=======================================
  Coverage   81.48%   81.48%           
=======================================
  Files          29       29           
  Lines        5413     5413           
  Branches      912      912           
=======================================
  Hits         4411     4411           
  Misses        762      762           
  Partials      240      240           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@webmiche
Copy link
Collaborator Author

Sometimes, I guess things are simpler than one initially thinks. There seems to be a mlir-opt target to build 😅

I will add it after the running CI job is done. Let's see what our execution time is afterward.

@webmiche webmiche force-pushed the mlir_based_ci branch 11 times, most recently from 72a52f5 to 3f4391a Compare November 29, 2022 16:45
@math-fehr
Copy link
Collaborator

Thanks a lot for that, that is helping a lot!

@math-fehr
Copy link
Collaborator

I think you mentionned on the slack that we should wait to merge this?

@webmiche
Copy link
Collaborator Author

Yes, I am trying to figure something out. I will merge it tomorrow once I succeeded/failed :)

@webmiche webmiche merged commit daa62d7 into main Nov 30, 2022
@webmiche webmiche deleted the mlir_based_ci branch December 14, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants