User Tools

Site Tools


schedule_code_generator_for_code_with_subsystem

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
schedule_code_generator_for_code_with_subsystem [2014/07/07 15:38]
yun [TargetMapping for Optimization]
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/output of a useEuqation identified with lable: The following command set the SpaceTimeMap for the (n)th input/output of a useEuqation identified with lable:
-<sxh cs; gutter:false>+<sxh cs; gutter:true>
 setSpaceTimeMapForUseEquationOptimization(program, system, label, isInput, n, SpaceTimeMapForMalloc, SpaceTimeMapForValueCopy, SpaceTimeMapForMemoryFree); setSpaceTimeMapForUseEquationOptimization(program, system, label, isInput, n, SpaceTimeMapForMalloc, SpaceTimeMapForValueCopy, SpaceTimeMapForMemoryFree);
 </sxh> </sxh>
 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/output. Those specification can also be specified separately with the following command: 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/output. Those specification can also be specified separately with the following command:
-<sxh cs; gutter:false>+<sxh cs; gutter:true>
 setSpaceTimeMapForMemoryAllocation(program, system, label, isInput, n, SpaceTimeMap); setSpaceTimeMapForMemoryAllocation(program, system, label, isInput, n, SpaceTimeMap);
 setSpaceTimeMapForValueCopy(program, system, label, isInput, n, SpaceTimeMap); setSpaceTimeMapForValueCopy(program, system, label, isInput, n, SpaceTimeMap);
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("./Matrix_product_SubSyst.ab"); prog = ReadAlphabets("./Matrix_product_SubSyst.ab");
 rootSystem = "matrix_product_SubSyst"; rootSystem = "matrix_product_SubSyst";
Line 81: Line 81:
 setSpaceTimeMapForUseEquationOptimization(prog, rootSystem, label, 1, 0, "(ip,jp->0,0,0,2)", "(ip,jp->1,ip,jp,3)", "(ip,jp->2,0,0,2)"); setSpaceTimeMapForUseEquationOptimization(prog, rootSystem, label, 1, 0, "(ip,jp->0,0,0,2)", "(ip,jp->1,ip,jp,3)", "(ip,jp->2,0,0,2)");
  
 +#command for generating the code 
 generateScheduledCode(prog, rootSystem, outDir); generateScheduledCode(prog, rootSystem, outDir);
 generateWrapper(prog, rootSystem, outDir); generateWrapper(prog, rootSystem, outDir);
Line 91: 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, rootSystem, label, 0, 0, "A"); setMemorySpaceForUseEuqationOptimization(prog, rootSystem, label, 0, 0, "A");
 </sxh> </sxh>
schedule_code_generator_for_code_with_subsystem.txt ยท Last modified: 2017/04/19 13:31 (external edit)