This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
schedule_code_generator_for_code_with_subsystem [2014/07/07 14:56] yun [TargetMapping for the Matrix Multiplication Example] |
schedule_code_generator_for_code_with_subsystem [2014/07/07 15:37] yun [TargetMapping for Optimization] |
||
---|---|---|---|
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/ | ||
- | < | + | < |
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/ | ||
- | < | + | < |
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. | ||
- | < | + | < |
prog = ReadAlphabets(" | prog = ReadAlphabets(" | ||
rootSystem = " | rootSystem = " | ||
Line 86: | Line 86: | ||
</ | </ | ||
+ | ====TargetMapping for Optimization==== | ||
+ | The schedule code generator generates three special statements for each input/ | ||
+ | by the <iP, jP>th instance of the use equation. Assume that the memory for matrix A, B and C are all allocated in row-wise major, the < | ||
+ | |||
+ | The following command is the command that specifies the optimization for the first input of the useEquation C. | ||
+ | <sxh cs; gutter: | ||
+ | setMemorySpaceForUseEuqationOptimization(prog, | ||
+ | < | ||