Replies: 16 comments 11 replies
-
Awesome, this looks like a great place to start! Take a look at the |
Beta Was this translation helpful? Give feedback.
-
Friday 6/17: I combined the Right now, the tests are just the previous I think future plans will probably have to do with a) making the code that I have already written better and b) (a bigger question) think about a compiler pass to conservatively determine when determine when components are (state and non-state) shareable, as mentioned in the original writeup. |
Beta Was this translation helpful? Give feedback.
-
Wed 6/22: Here's an example I've been thinking about:
Here, I was thinking something like this is correct: edit: it seems like there will be a lot of overlap between the dominators of A,O, C, and D. Moreover, there will be a lot of overlap between the dominators of groups in the same par block. I am tempted to use this idea but can't seem to figure out how. I could be way off w/ my thinking though. @rachitnigam or @sampsyo would one of you be able to talk about this in more detail in person, maybe tomorrow? (I'll be at 407 in person). In the meantime, I will work on some other stuff having to do with the PR I made combining minimize_regs and resource_sharing. |
Beta Was this translation helpful? Give feedback.
-
Fri 6/24: I'm pretty sure it for most cases, but I still haven't convinced myself fully that my thing is correct. Mainly it has to do with how I handle while loops; specifically how I calculate the dominators of a while loop guard. Basically, I'm going to argue that I can ignore the last node in the body of a while loop when taking the predecessors of the while guard, since the dominators of the last node in the while body are either a) in the while loop, in which case we know it won't be a dominator of the while guard, or b) are outside the while loop, in which case we know they dominate at least one of the other predecessors of the while guard. I'll continue working on this domination pass, and hopefully get it working. |
Beta Was this translation helpful? Give feedback.
-
Wed 6/29: Tuesday pushed the changes for cell_share (which combined minimize_regs and resource_sharing). One really specific thing that I was going to ask the other day about
I still haven't come up with a good way to make it cleaner. I think trying to get Nonetheless in the coming days my focus will be on getting the |
Beta Was this translation helpful? Give feedback.
-
Friday 6/1 While working on the infer-share pass, I discovered that since LiveRangeAnalysis did not use Another concerning problem with the infer share stuff is this: the Dahlia likes to compile groups like this, where
Unfortunately, the way my pass is currently written, since
|
Beta Was this translation helpful? Give feedback.
-
Wed 7/6 |
Beta Was this translation helpful? Give feedback.
-
I've been working on the One thing that came up w/ @rachitnigam was when we have a group like
one of the groups is
Group2Invoke isn't able to pick turn this into an invoke bc of the I've also been starting to work on generalizing the group2invoke pass-- it's not ready to. make a PR but I've made some progress. I also had a question that I outlined in #1086. It's a very code/rust specific question. |
Beta Was this translation helpful? Give feedback.
-
Monday 7/18 (Sorry I haven't been keeping up w/ this) Got the infer sharing pass merged and working on getting group2seq and group2invoke merged as well. Not too many questions on it. Future plans:
|
Beta Was this translation helpful? Give feedback.
-
Wed 7/20 Worked on making Now, working on trying to make I mentioned conflict calculation, since that's one of the two main things that makes the Finally, I'm not sure if this is true, but the performance of |
Beta Was this translation helpful? Give feedback.
-
Fri 7/22 Worked on significantly speeding up the A couple more thoughts: I also think we can make 'm beginning to think that I might need to speed up LiveRangeAnalysis, which I haven't done yet. One thought I had (and this could actually be a bad idea that would actually make the pass way slower) was maybe organize live ranges by cell type: so instead of having just a single I can also work on finishing up |
Beta Was this translation helpful? Give feedback.
-
Monday 7/25 |
Beta Was this translation helpful? Give feedback.
-
7/27 One problem that I've been running into is this: say we have:
Right now when we determine whether or not
|
Beta Was this translation helpful? Give feedback.
-
Update 8/2 I've also been thinking about bounded sharing (i.e. only sharing a given resource k times at most). I've been trying to think of non-greedy ways to implement a coloring algorithm that handles this. |
Beta Was this translation helpful? Give feedback.
-
8/4 Update Now I'm focused on bounded sharing. We decided to go w/ the greedy algorithm for now (although that could change). I've wrote a (poorly written) python script that can collect the bounded-sharing information. It works on smaller files but I've been getting an error message on lenet. |
Beta Was this translation helpful? Give feedback.
-
8/8 Update I'm a bit stuck on the lenet stuff. I've gotten it partially working but for some reason it only gives the resource estimates for the synthesis files and not the implementation files. My best shot at this point is probably to change the hardware we are targeting, so I'll see what leads I can get on that end tomorrow. However, I'm a bit worried (although this is just a feeling, not sure about it) that even if we just use the original lenet file targeting hardware that can handle bigger memory, that it still won't work for the implementation files. In the meantime, I've edited LiveRangeAnalysis to include comb groups, which allows us to reorder the default passes. I've also decided to push greedy bounded sharing. Right now, the bounds are an extra argument you can pass to cell-share. If you don't pass them, then you currently get the default values, which are 4 (for comb components), 6 (for registers), and 18 (for everything else). If/when I get lenet working and get results on what is the optimal sharing bounds are, we can set the default values to be less arbitrary. |
Beta Was this translation helpful? Give feedback.
-
I just discussed with @sampsyo and here is the plan we currently have for the Generalize Sharing. Tagging @rachitnigam so that you are up to date/ can make suggestions.
The overall idea is that, right now, we have two types of sharing:
minimize-regs
does this type of sharing.resource-sharing
does this type of sharing.Ultimately, we want to combine both of these types of sharing into 1 pass. We also want to be able to incorporate user-defined components into this sharing pass too, not just combinational primitives and registers.
Here are the steps we were thinking of:
Change
minimize-regs
pass so that, instead of looking for "std_regs" components, it looks for any component with a new "state sharing" attribute that we will come up with, and does live range analysis on those components. This be helpful if we see state-shareable user defined components, as we would now be able to attach the "state-sharing" attribute to it. This won't actually change the functionality of theminimize-regs
pass.Somehow combine the
minimize-regs
andresource-sharing
pass.A good first step will be to just use a lot of the code of
resource-sharing
and intelligently copy+paste parts of it into theminimize-regs
pass in order to get both passes combined into one.However, this is still a bit like two passes running in parallel rather than the passes being truly combined.
An idea (possibly a bad one) would be to edit
LiveRangeAnalysis
to include non-state shareable components too. The live range analysis would work like it usually does, except at the end, I could just also insert all of the non-state-shareable components as "live" in the group they are contained in.Finally, another important idea in the writeup was to be able to detect when user-defined components are shareable. We can think of ways of being able to detect this.
Beta Was this translation helpful? Give feedback.
All reactions