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: Translate memref to dsd #3092

Merged
merged 19 commits into from
Aug 28, 2024
Merged

transformations: Translate memref to dsd #3092

merged 19 commits into from
Aug 28, 2024

Conversation

n-io
Copy link
Collaborator

@n-io n-io commented Aug 23, 2024

Translate memref to csl dsd ops.

Todo: Finalise how global buffers are stored.

@n-io n-io added the transformations Changes or adds a transformatio label Aug 23, 2024
@n-io n-io requested a review from dk949 August 23, 2024 17:09
@n-io n-io self-assigned this Aug 23, 2024
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.89%. Comparing base (a2ed14d) to head (9811518).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3092      +/-   ##
==========================================
- Coverage   89.91%   89.89%   -0.02%     
==========================================
  Files         419      421       +2     
  Lines       53070    53252     +182     
  Branches     8226     8256      +30     
==========================================
+ Hits        47718    47871     +153     
- Misses       4023     4042      +19     
- Partials     1329     1339      +10     

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

@n-io n-io force-pushed the nicolai/memref-to-dsds branch from 1ee9981 to 4fe880f Compare August 26, 2024 13:40
@n-io n-io marked this pull request as ready for review August 27, 2024 09:44
xdsl/dialects/csl/csl.py Outdated Show resolved Hide resolved
xdsl/transforms/memref_to_dsd.py Show resolved Hide resolved

# update offsets only if they differ from op.source.type
if op.static_offsets.data.data[0].data == memref.Subview.DYNAMIC_INDEX:
pass # todo
Copy link
Collaborator

Choose a reason for hiding this comment

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

🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

What happens if we hit this? What is to be done?

Copy link
Collaborator Author

@n-io n-io Aug 28, 2024

Choose a reason for hiding this comment

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

basically the same as for static, working on this now. If the value is (directly) from an arith const, we can check if we need to generate the offset/stride/size dsd instruction. Mostly, I suppose, we have to act blindly as one does with dynamic values. However, there's nothing in our pipeline that actually generates dynamic values here, so it's purely optical and not actually necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I came to think, if we have a dynamic value, let's assume it is not as de-facto static as coming from an arith.constant (in this case, we should find or write a pass to promote arith.constant to static values). It's probably simpler and cleaner to not analyse dynamic values here and simply generate dsd modify ops for each dynamic value, without analysis.

@n-io n-io requested a review from dk949 August 28, 2024 10:11
Copy link
Collaborator

@dk949 dk949 left a comment

Choose a reason for hiding this comment

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

I think it all makes sense

@n-io n-io merged commit 6ff156c into main Aug 28, 2024
13 checks passed
@n-io n-io deleted the nicolai/memref-to-dsds branch August 28, 2024 17:39
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.

2 participants