-
Notifications
You must be signed in to change notification settings - Fork 72
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
dialects: (csl) Data structure descriptors #2648
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2648 +/- ##
==========================================
+ Coverage 89.60% 89.62% +0.01%
==========================================
Files 360 364 +4
Lines 46179 46658 +479
Branches 6978 7057 +79
==========================================
+ Hits 41378 41816 +438
- Misses 3726 3748 +22
- Partials 1075 1094 +19 ☔ View full report in Codecov by Sentry. |
Would |
Since they need different fields specified, making it a separate op is actually a viable option. |
In that case it would make sense to rename this op (and class) something like I think it makes sense for both ops to still return a EDIT: by both ops I mean this and the hypothetical future |
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.
If this is all that is needed to get DSDs supported in xDSL then that's amazing! I'm afraid that I don't know much about the internals of DSDs though, so for that @dk949 is probably the better conversation partner!
From my side this looks good!
@@ -70,6 +70,10 @@ csl.func @initialize() { | |||
%many_arr_ptr = "csl.addressof"(%arr) : (memref<10xf32>) -> !csl.ptr<f32, #csl<ptr_kind many>, #csl<ptr_const const>> | |||
%single_arr_ptr = "csl.addressof"(%arr) : (memref<10xf32>) -> !csl.ptr<memref<10xf32>, #csl<ptr_kind single>, #csl<ptr_const const>> | |||
|
|||
%dsd_1d = "csl.get_dsd"(%arr, %scalar) : (memref<10xf32>, i32) -> !csl<dsd mem1d_dsd> | |||
%dsd_2d = "csl.get_dsd"(%arr, %scalar, %scalar) : (memref<10xf32>, i32, i32) -> !csl<dsd mem4d_dsd> |
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.
Two questions here:
- Can we not just read the sizes from the memref type?
- Can we have two sizes passed to the get_dsd if the underlying array is 1D?
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.
- What if you don't want to iterate over the entire buffer?
- It will fail to verify.
I've added |
|
A basic implementation of dsd types and the
@get_dsd
. Custom array index expressions are not yet supported, and the current version should be understood (and printed) as accessingA[i,j,k]
according to the number of dimensions and generate induction vars accordingly.