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

Functions

void OpenKernelGroup (char *GroupName)
 Open a user kernel group. More...
 
void CloseKernelGroup ()
 Close currently open user kernel group. More...
 
void CloseKernelGroupNoMerge ()
 Close currently open user kernel group setting KER_OPT_KEEP_GROUP for nodes in the group. More...
 
CKernelCall_TUserKernelCall (char *CallName, KernelCallLocationT CallLocation, ArgBindingDescr_T **BindingList)
 Call a user kernel in a user kernel group. More...
 
Object_TKerGroupArg (char *KerArgName, Object_Type_T ObjType, int ArgSize, int ItemSize, char *CArgName)
 
ArgBindingDescr_TKG_ArgOper (char *ArgName, char Oper, int Value)
 Binds argument to a user kernel group argument and combine it with Value using Oper. More...
 
StackedTensors_TAT_StackedTensors (char *OutTensorName, int Count,...)
 Creates a stacked tensor, resulting object is OutTensorName, Count in tensors passed as names are stacked according to list order. More...
 
void AddStackedTensors (char *OutTensorName, int Count,...)
 Add a stacked tensor to the open graph. More...
 
StackedTensors_TAT_StackedTensorsList (int Count,...)
 Creates a list of stacked tensors. More...
 
CKernel_Arg_TStackedTensorsLookup (StackedTensors_T *List, NameT *Name)
 Given input tensor Name returns corresponding Out Stacked Tensor if it exists. More...
 
void UserKernelGroup (char *GroupName, CKernel_Arg_T **CArg, CKernelCall_T **CCalls)
 Declare a user kernel group. More...
 
KernelGroup_TUserKernelGroupK (char *GroupName, unsigned int IterCount, CKernel_Arg_T **CArg, StackedTensors_T *StackedTensors, CKernelCall_T **CCalls, Object_T **KerArg)
 

Description

Functions in this group should be used to create groups of user kernels

A user kernel group starts with an OpenKernelGroup() followed by multiple UserKernel() and CloseKernelGroup()

Then the group header and how user kernels are called in the group are captured in UserKernelGroup()

Function Documentation

void AddStackedTensors ( char *  OutTensorName,
int  Count,
  ... 
)

Adds a stacked tensor to the graph. The stacked tensor creates a series of aliases for the tensor OutTensorName which should be declared as an output or local. The aliases can be used as outputs of kernels and will be assembled in the order declared into the output tensor.

StackedTensors_T* AT_StackedTensors ( char *  OutTensorName,
int  Count,
  ... 
)

Creates a list of stacked tensors, resulting object is OutTensorName, Count in tensors passed as names are stacked according to list order

StackedTensors_T* AT_StackedTensorsList ( int  Count,
  ... 
)

Creates a list of stacked tensors

void CloseKernelGroup ( )

Close currently open user kernel group.

void CloseKernelGroupNoMerge ( )

Close currently open user kernel group setting KER_OPT_KEEP_GROUP for nodes in the group

Object_T* KerGroupArg ( char *  KerArgName,
Object_Type_T  ObjType,
int  ArgSize,
int  ItemSize,
char *  CArgName 
)
Parameters
KerArgNameUser kernel group argument name
ObjTypeArgument type, O_IN and/or O_OUT can be used only
ArgSizeNumber of elements of this argument
ItemSizeSize in byte of the elementary data type of this argument
CArgNameCorresponding name in the User Kernel Group definition
ArgBindingDescr_T* KG_ArgOper ( char *  ArgName,
char  Oper,
int  Value 
)

Binds argument to a user kernel group argument and combine it with Value using Oper

See K_Arg() for ArgName and ArgSelect. Supported operation are defined in ArgBindingOper. Value is a signed immediate constant.

Parameters
ArgNameA tiled user kernel argument name
OperOperation, see ArgBindingOper. Valid: + - * / %
ValueA signed immediate value
void OpenKernelGroup ( char *  GroupName)

Open a user kernel group

Parameters
GroupNameC name to be used for the group
CKernel_Arg_T* StackedTensorsLookup ( StackedTensors_T List,
NameT *  Name 
)

Given input tensor Name returns corresponding Out Stacked Tensor if it exists

Parameters
ListA list of stacked tensor
NameInput tensor name to search
CKernelCall_T* UserKernelCall ( char *  CallName,
KernelCallLocationT  CallLocation,
ArgBindingDescr_T **  BindingList 
)

Call a user kernel in a user kernel group

Parameters
CallNameA user kernel name
CallLocationHere only LOC_IN_GROUP is valid
BindingListSee Bindings(). restricted to C_Arg(), C_ArgIndex(), C_ArgIndirect() and Imm()
void UserKernelGroup ( char *  GroupName,
CKernel_Arg_T **  CArg,
CKernelCall_T **  CCalls 
)

Declare a user kernel group

Parameters
GroupNameGroup's name as in OpenKernelGroup()
CArgSee Carg() and TCArg()
CCallsSee Calls() and UserKernelCall()
KernelGroup_T* UserKernelGroupK ( char *  GroupName,
unsigned int  IterCount,
CKernel_Arg_T **  CArg,
StackedTensors_T StackedTensors,
CKernelCall_T **  CCalls,
Object_T **  KerArg 
)
Parameters
GroupNameGroup's name as in OpenKernelGroup()
IterCountNumber of time this group should be iterated, usually 1 but used for grouped convolution
CArgSee Carg() and TCArg()
StackedTensorsList of stacked tensors
CCallsSee Calls() and UserKernelCall()
KerArgKernel Group arguments. Restricted to KerGroupArg() as argument of KerArgs()