Auto Tiler Library
|
Macros | |
#define | AT_OPT_ON |
Macros to pass value to AT_SetGraphCtrl and to CNN_SetGenCtrl/CNN_SetGenCtrlList. More... | |
#define | AT_OPT_OFF |
#define | AT_OPT_VAL(Val) |
Functions | |
void | SetStyle (int Old) |
Set user kernel style modelization mode. More... | |
int | TilerParseOptions (int argc, char **argv) |
Parses AutoTiler options and performs initialization. More... | |
void | GenerateTilingCode () |
Generate code from the user model. More... | |
void | SetUsedFilesNames (char *StdTypedefsName, unsigned int LibKernelFileCount,...) |
Provides header file for basic kernels standard data type and a list of basic kernels header files. More... | |
void | SetGeneratedFilesNames (char *CallTemplatesName, char *CallTemplatesNameHeader) |
Defines files's names for code generation output. More... | |
void | SetSymbolNames (char *L1SymbName, char *L2SymbName) |
Defines C symbol names used for user kernel's code generation. More... | |
void | SetMemoryBaseNames (char *L1SymbName, char *L2SymbName, char *L3SymbName) |
Defines C symbol names used for user kernel's code generation. More... | |
void | SetSymbolDynamics () |
Set variables used for AutoTiler dynamic needs in cluster shared L1 memory and in L2 memory to be dynamic, e.g pointers, instead of arrays. More... | |
void | SetL1MemorySize (unsigned int Size) |
Set the maximum amount in shared L1 memory that the AutoTiler can use. More... | |
void | SetMemorySizes (unsigned int L1Size, unsigned int L2Size, unsigned int L3Size) |
Set the maximum amount in shared L1 memory, L2 internal memory and L3 external RAM that the AutoTiler can use. More... | |
void | SetMemoryDeviceInfos (int Count,...) |
Configure memory devices. More... | |
void | SetInlineMode (InlineModeT Mode) |
Control code generation inline strategy. More... | |
void | SetKernelOpts (KernelOptimizationT On, KernelOptimizationT Off) |
Control user kernel optimizations. More... | |
void | SetConstDir (char *DirName) |
Provides a folder name where to find constant files passed to ConstInfo() More... | |
Functions in this group control the compilation flow of the AutoTiler
#define AT_OPT_OFF |
#define AT_OPT_ON |
Macros to pass value to AT_SetGraphCtrl and to CNN_SetGenCtrl/CNN_SetGenCtrlList
#define AT_OPT_VAL | ( | Val | ) |
void GenerateTilingCode | ( | ) |
Generate code from the user model
Once the model has been fully populated calling this function will produce the C code wrapping each user kernel
void SetConstDir | ( | char * | DirName | ) |
Provides a folder name where to find constant files passed to ConstInfo()
DirName | A valid directory name |
void SetGeneratedFilesNames | ( | char * | CallTemplatesName, |
char * | CallTemplatesNameHeader | ||
) |
Defines files's names for code generation output
These 2 names are having as default values: GenKernels.c, GenKernels.h
CallTemplatesName | A .c file for user kernels C generated code |
CallTemplatesNameHeader | A .h file to export user kernels C generated code |
void SetInlineMode | ( | InlineModeT | Mode | ) |
Control code generation inline strategy
User kernels can be either always inlined, never inlined or inlined only if there is a single instance of a given user kernel
Mode | Inline mode |
void SetKernelOpts | ( | KernelOptimizationT | On, |
KernelOptimizationT | Off | ||
) |
Control user kernel optimizations
Previous optimization settings is changed based on On and Off parameters. Initial value is On for all optimizations.
On | Optimizations to be turned ON |
Off | Optimizations to be turned OFF |
void SetL1MemorySize | ( | unsigned int | Size | ) |
Set the maximum amount in shared L1 memory that the AutoTiler can use
Size | Maximum size in byte |
void SetMemoryBaseNames | ( | char * | L1SymbName, |
char * | L2SymbName, | ||
char * | L3SymbName | ||
) |
Defines C symbol names used for user kernel's code generation
Default names are L1_Memory, L2_Memory, L3_Memory
L1SymbName | C var name, pointer or array, for AutoTiler dynamic needs in cluster shared L1 memory |
L2SymbName | C var name, pointer or array, for AutoTiler dynamic needs in L2 memory |
L3SymbName | C var name, pointer or array, for AutoTiler dynamic needs in L3 memory (PreferedExecLoc) |
void SetMemoryDeviceInfos | ( | int | Count, |
... | |||
) |
Configure memory devices, A list of count items where each item is a tuple of 5 elements Space AT_MemLocation_T Which memory space AvailableMemory int available memory to be used on this device MemmoryBaseName char * a legal C var name to be used as a base in this memory device ConstFileName char * a file name to be used if loading constant in this device is needed, flash device only ExtManaged int 0 if device configuration code should be generated, != 0 if managed externally
Count | Number of Items |
void SetMemorySizes | ( | unsigned int | L1Size, |
unsigned int | L2Size, | ||
unsigned int | L3Size | ||
) |
Set the maximum amount in shared L1 memory, L2 internal memory and L3 external RAM that the AutoTiler can use
L1Size | Maximum L1 size in byte |
L2Size | Maximum L2 size in byte |
L3Size | Maximum L3 size in byte |
void SetStyle | ( | int | Old | ) |
Set user kernel style modelization mode. If Old=1 uses Kernel Arg property to express Ker Arg iter space, If Old=0 use KerArgSpace() extra argument instead.
Old | Style mode, 0: New style, != 0 Old style |
void SetSymbolDynamics | ( | ) |
Set variables used for AutoTiler dynamic needs in cluster shared L1 memory and in L2 memory to be dynamic, e.g pointers, instead of arrays
void SetSymbolNames | ( | char * | L1SymbName, |
char * | L2SymbName | ||
) |
Defines C symbol names used for user kernel's code generation
Default names are L1_Memory, L2_Memory
L1SymbName | C var name, pointer or array, for AutoTiler dynamic needs in cluster shared L1 memory |
L2SymbName | C var name, pointer or array, for AutoTiler dynamic needs in L2 memory |
void SetUsedFilesNames | ( | char * | StdTypedefsName, |
unsigned int | LibKernelFileCount, | ||
... | |||
) |
Provides header file for basic kernels standard data type and a list of basic kernels header files
StdTypedefsName | File names where standard typedefs used by basic kernels are declared |
LibKernelFileCount | Number of header files for basic kernels to be imported into the current model, list of strings follows |
int TilerParseOptions | ( | int | argc, |
char ** | argv | ||
) |
Parses AutoTiler options and performs initialization
This function takes care of AutoTiler arguments parsing and of initialization.
Any user model should start with a call to it. it will return 0 if arguments are ok and if the initialization is sucessfull
argc | Number of arguments |
argv | A string for each argument |