Enhance Dense Layout Evaluation in All Tiers of Memory Hierarchyrelease dense layoutloop evaluation, test passing#301
Enhance Dense Layout Evaluation in All Tiers of Memory Hierarchyrelease dense layoutloop evaluation, test passing#301angshuman-parashar merged 4 commits intoNVlabs:masterfrom JianmingTONG:layoutloop
Conversation
|
Clang on Darwin is unhappy about an unused variable: It looks like the entire code block in lines 1014-1026 needs to be removed or moved into the |
|
Updated! This is caused by a version issue on my end -- sry for the introduced trouble and thanks for the help! |
|
I don't believe |
|
Thanks for reminding! Fixed :D |
|
Another unused variable: You can just add a Also there are some indentation inconsistencies, e.g., If possible please use either (preferred): or: |
|
Fixed unused input compute_cycles and corected format -- thanks! |
Overview
This PR enables timeloop to evaluation data layout in all tiers of memory hierarchy for all dataspaces, verified on typical convolutions; Test pass; Format Clean;
Pls see https://docs.google.com/presentation/d/1L3QLatmdSMooeVGd1ixgejq0fpmbsWQslSx8S5qZUKI/edit?usp=sharing for more details.
How do I use this feature?
Simple! Just
(1) Add "ranks" to each dataspace in your problem configuration file such as layer.yaml below.
(2) Define the layout.yaml for the input problem configuration, such as layout.yaml below. The concrete specifications for how to write a layout.yaml is listed below.
(3) No changes required for mapping, constraint and architecture defintion.
Ready to Run?
Layout Specifications
The layout.yaml specifies the layout of each data space.
We assume each data space is projected to a tensor with dimensions C, M, R, S, N, P, Q.
Each data space has multiple ranks, and each rank is projected to one or more dimensions.
For example, {"Inputs", {"Z", "V", "W", "H"}} means data space "Inputs" has four ranks including Z, V, W, and H.
Take another example,
ankToFactorizedDimensionID = {
{"V", {0}},
{"H", {3, 6}},
{"E", {1}},
{"Z", {4}},
{"I", {6}},
{"U", {5}},
{"J", {2}},
{"K", {3}},
{"W", {2, 5}}
};
std::map<std::string, FactorizedDimensionID> dimensionNameToDimID = {
{"C", 0}, {"M", 1}, {"R", 2}, {"S", 3}, {"N", 4}, {"P", 5}, {"Q", 6}
};
means that rank "W" is projected to dimension "R" (dimID=2) and 5, rank "H" is projected to dimension 3 and 6.
permutation specifies the loop order of all ranks, left to right specifies innermost to outermost loop.
factor specifies the factor of each rank in individual loop.
type:
Enjoy! :D