aclopCreateKernel
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Creates the kernel function of a dynamic-shape operator for operator execution.
Prototype
1 2 3 4 5 6 7 | aclError aclopCreateKernel(const char *opType, const char *kernelId, const char *kernelName, void *binData, int binSize, aclopEngineType enginetype, aclDataDeallocator deallocator) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
opType |
Input |
Pointer to the operator type. |
kernelId |
Input |
Pointer to the kernel ID to be specified during operator execution. |
kernelName |
Input |
Operator kernel name, which must be the same as the kernelName argument in the operator binary file. |
binData |
Input |
Pointer to the memory address of the operator kernel file. |
binSize |
Input |
Memory size of the operator kernel file, in bytes. |
enginetype |
Input |
Operator execution engine. For details about the type definition, see aclopEngineType. |
deallocator |
Input |
Callback function to free binData memory. The callback function is set based on the construction of binData by the caller. If the data is freed by the caller, leave this parameter empty. Prototype: typedef void (*aclDataDeallocator)(void *data, size_t length); |
Returns
0 on success; else, failure. For details, see aclError.