Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Obtains the time (ns) required for executing an operator.
You are advised to create a thread and call this API in the new thread. Otherwise, this API call will block the main thread.
1 | uint64_t aclprofGetOpDuration(const void *opInfo, size_t opInfoLen, uint32_t index) |
1 | op_duration = acl.prof.get_op_duration(op_info, op_info_len, index) |
Parameter |
Description |
|---|---|
op_info |
Int, specified memory address. |
op_info_len |
Int, length of the operator information. |
index |
Int, operator index. The value range is [0, Operator count – 1]. Call acl.prof.get_op_num to obtain the operator count. |
Return Value |
Description |
|---|---|
op_duration |
Int, time required for executing the operator. |