This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
schedule_code_generator_for_code_with_subsystem [2014/07/07 15:39] yun [TargetMapping for the Matrix Multiplication Example] |
schedule_code_generator_for_code_with_subsystem [2017/04/19 13:31] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
The following code is the alpha program for matrix matrix multiplication with dot-product subsystem. | The following code is the alpha program for matrix matrix multiplication with dot-product subsystem. | ||
- | <sxh alphabets; gutter:false> | + | <sxh alphabets; gutter:true> |
affine matrix_product_SubSyst {N,K,M | N>0 && K>0 && M > 0} // Product between a N*K matrix and a K*M matrix | affine matrix_product_SubSyst {N,K,M | N>0 && K>0 && M > 0} // Product between a N*K matrix and a K*M matrix | ||
input | input | ||
Line 41: | Line 41: | ||
The following command set the SpaceTimeMap for the (n)th input/ | The following command set the SpaceTimeMap for the (n)th input/ | ||
- | <sxh cs; gutter:false> | + | <sxh cs; gutter:true> |
setSpaceTimeMapForUseEquationOptimization(program, | setSpaceTimeMapForUseEquationOptimization(program, | ||
</ | </ | ||
The parameter isInput sepcifies whether the SpaceTimeMap is specified for input or not, and the last three prarameter specifies the space time map for the three special statement attached to the current input/ | The parameter isInput sepcifies whether the SpaceTimeMap is specified for input or not, and the last three prarameter specifies the space time map for the three special statement attached to the current input/ | ||
- | <sxh cs; gutter:false> | + | <sxh cs; gutter:true> |
setSpaceTimeMapForMemoryAllocation(program, | setSpaceTimeMapForMemoryAllocation(program, | ||
setSpaceTimeMapForValueCopy(program, | setSpaceTimeMapForValueCopy(program, | ||
Line 52: | Line 52: | ||
The following script consists all the commands that specifies the TargetMapping for the matrix multiplication example and generates the code. | The following script consists all the commands that specifies the TargetMapping for the matrix multiplication example and generates the code. | ||
- | <sxh cs; gutter:false> | + | <sxh cs; gutter:true> |
prog = ReadAlphabets(" | prog = ReadAlphabets(" | ||
rootSystem = " | rootSystem = " | ||
Line 92: | Line 92: | ||
The following command is the command that specifies the optimization for the first input of the useEquation C. | The following command is the command that specifies the optimization for the first input of the useEquation C. | ||
- | <sxh cs; gutter:false> | + | <sxh cs; gutter:true> |
setMemorySpaceForUseEuqationOptimization(prog, | setMemorySpaceForUseEuqationOptimization(prog, | ||
</ | </ |