Auto Tiler Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CompilationFlowControl

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...
 

Description

Functions in this group control the compilation flow of the AutoTiler

Macro Definition Documentation

#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)

Function Documentation

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()

Parameters
DirNameA 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

Parameters
CallTemplatesNameA .c file for user kernels C generated code
CallTemplatesNameHeaderA .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

Parameters
ModeInline 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.

Parameters
OnOptimizations to be turned ON
OffOptimizations to be turned OFF
void SetL1MemorySize ( unsigned int  Size)

Set the maximum amount in shared L1 memory that the AutoTiler can use

Parameters
SizeMaximum 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

Parameters
L1SymbNameC var name, pointer or array, for AutoTiler dynamic needs in cluster shared L1 memory
L2SymbNameC var name, pointer or array, for AutoTiler dynamic needs in L2 memory
L3SymbNameC 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

Parameters
CountNumber 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

Parameters
L1SizeMaximum L1 size in byte
L2SizeMaximum L2 size in byte
L3SizeMaximum 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.

Parameters
OldStyle 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

Parameters
L1SymbNameC var name, pointer or array, for AutoTiler dynamic needs in cluster shared L1 memory
L2SymbNameC 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

Parameters
StdTypedefsNameFile names where standard typedefs used by basic kernels are declared
LibKernelFileCountNumber 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

Parameters
argcNumber of arguments
argvA string for each argument