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

transformations: adds a single pass from stencil to csl #3231

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dk949
Copy link
Collaborator

@dk949 dk949 commented Oct 1, 2024

This pass combines (using a PipelinePass) all previously written passes and makes it easier to keep track of the order in which the passes need to be ran.

This pass combines (using a `PipelinePass`) all previously written
passes and makes it easier to keep track of the order in which the
passes need to be ran.
@dk949 dk949 added the transformations Changes or adds a transformatio label Oct 1, 2024
@dk949 dk949 requested a review from n-io October 1, 2024 15:55
@dk949 dk949 self-assigned this Oct 1, 2024
@dk949
Copy link
Collaborator Author

dk949 commented Oct 1, 2024

@n-io, is this order correct? Also where does StencilShapeMinimize go in the pipeline?

@@ -442,6 +447,7 @@ def get_stencil_bufferize():
"convert-scf-to-riscv-scf": get_convert_scf_to_riscv_scf,
"convert-snitch-stream-to-snitch": get_convert_snitch_stream_to_snitch,
"convert-stencil-to-csl-stencil": get_convert_stencil_to_csl_stencil,
"convert-stencil-to-csl": get_convert_stencil_to_csl,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend calling it test-convert-stencil-to-csl, to minimise the confusion of alternative ways of getting to places. Ideally the csl work would actually have its own driver, and not use xdsl-opt, something like the toy command line tool that is toy-specific.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed as suggested.

Though, this is less of a driver, and more just a way to keep track of the order of passes developed so far.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though, this is less of a driver, and more just a way to keep track of the order of passes developed so far.

Well... Isn't that what the "driver" is though?

This would also allow us to add some simple logic to print the layout and program to multiple files and such. I guess we should discuss how to build actual compiler tools with xDSL (where you get an interface like stencilcc --march=cs2 my_input_file.mlir --out_dir=out that will write multiple files into ./out for the csl stencil work)

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.10%. Comparing base (6726d0f) to head (a702098).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3231      +/-   ##
==========================================
+ Coverage   90.07%   90.10%   +0.03%     
==========================================
  Files         437      438       +1     
  Lines       54844    54889      +45     
  Branches     8518     8521       +3     
==========================================
+ Hits        49402    49460      +58     
+ Misses       4062     4052      -10     
+ Partials     1380     1377       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@superlopuh
Copy link
Member

What's the latest on this? It seems useful to me. I would just advise outlining the pass pipeline to a tuple available at the top of the file, I've found it useful for the equivalent riscv functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transformations Changes or adds a transformatio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants