Function: create_kernel
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Creates the kernel function of a dynamic-shape operator for operator execution.
Prototype
- C 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)
- Python Function
1ret = acl.op.create_kernel(op_type, kernel_id, kernel_name, bin_data, bin_size, enginetype, deallocator)
Parameters
Parameter |
Description |
|---|---|
op_type |
Str, operator type. |
kernel_id |
Str, kernel ID. |
kernel_name |
Str, operator kernel name, which must be the same as the kernelName argument in the operator binary file. |
bin_data |
Int, memory address of the operator kernel file. |
bin_size |
Int, memory size (in bytes) of the operator kernel file. |
enginetype |
Int, operator execution engine. This parameter is valid only when compile_flag of acl.op.update.params is set to ACL_COMPILE_SYS.
|
deallocator |
Int, whether to automatically release the bin_data memory.
|
Returns
Return Value |
Description |
|---|---|
ret |
Int, error code: 0 on success; else, failure. |