Function: set_kernel_args
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Sets tiling arguments and number of concurrency times of a dynamic-shape operator.
Prototype
- C Prototype
1 2 3 4 5
aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc, const char *kernelId, uint32_t blockDim, const void *args, uint32_t argSize)
- Python Function
1ret = acl.op.set_kernel_args(kernel_desc, kernel_id, block_dim, args, arg_size)
Parameter Description
|
Parameter |
Description |
|---|---|
|
kernel_desc |
Int, kernel description buffer, pointer address of the aclopKernelDesc type. |
|
kernel_id |
Str, kernel ID. It must be the same as that passed to the acl.op.create.kernel call. |
|
block_dim |
Int, number of blocks for kernel concurrent execution. |
|
args |
Int, tiling parameter. Use the NumPy array tobytes to obtain the bytes object, and then call acl.utils.bytes_to_ptr() to obtain the tiling parameter pointer address. |
|
arg_size |
Int, memory size of the tiling parameter, in bytes. It is the object length of bytes converted from numpy.tobytes() and can be obtained by using the len function. |
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |