-
Notifications
You must be signed in to change notification settings - Fork 54
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
What does partition do? #8
Comments
Hi Matt, Thanks for your questions. A few clarifications:
Sam |
Hi Sam, Thanks a lot for your prompt reply. Can you please explain why this is required? A pointer to a paper or an article would be great. The reason I am asking this is that I partitioned all the necessary arrays to registers, but I get a segmentation fault when scheduling begins. I would like to know if partitioning can affect scheduling. |
Partitioning absolutely affects scheduling - the more you partition an array, the more memory bandwidth you are provisioning for your accelerator, and more concurrent memory accesses leads to faster execution (which means a different schedule). You have to declare the arrays in the configuration file because that's how Aladdin knows about them in the first place. All of the fields are important - name, size, word size, and partitioning factor - and getting one of them wrong could potentially lead to unexpected behavior. As a side note, generally, you only want to partition very small arrays completely into registers, as they are much more expensive to build than SRAMs. For more information, I suggest you read the original Aladdin paper. |
Thanks a lot for your thorough explanation. I had read the paper a couple of times, but I still had issues understanding partitions. I guess the concept is clear now. By the way, the reason for segmentation fault was loop unrolling configuration. It looks like I have to explicitly mention loop unrolling factor even if I do not want to unroll any of the loops (unroll once). |
Yes, that is correct. Aladdin's loop unrolling optimization is actually a loop rolling operation, because we start with the idealistic DDDG that only has true memory dependences, so at the beginning, all loops are completely unrolled (aka flattened). In order to model loop unrolling, we then add additional dependences to the loops. So if you don't mention loop unrolling for a loop, then Aladdin wouldn't know that loop exists at all, and then that loop would remain flattened - it's not so trivial to set a default to 1 because we don't know a priori where all the loops are in the dynamic trace to begin with. |
I have written a top-level function which calls a few helper functions in order to implement an algorithm. Based on #7, I added every function's name to the WORKLOAD variable. However, I haven't partitioned any of my 1D or 2D arrays. Can you please explain what partitioning does (cyclic in particular)? What is the benefit of doing it?
The reason I am asking this question is that I get the following error when I start the simulation
Unknown partition : m@inst: 9
and I guess it has something to do with the partitioning.
Excuse me if the question is trivial. I am not from the architecture community and not very familiar with low-level details.
Thanks,
Matt
The text was updated successfully, but these errors were encountered: