Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Loads and parses the AI CPU operator binary data from the memory and outputs the binHandle that points to the operator binary data.
When calling this API to load an AI CPU operator (option_type in aclrtBinaryLoadOptions contains ACL_RT_BINARY_LOAD_OPT_CPU_KERNEL_MODE), call acl.rt.register_cpu_func to register the operator.
1 | aclError aclrtBinaryLoadFromData(const void *data, size_t length, const aclrtBinaryLoadOptions *options, aclrtBinHandle *binHandle) |
1 | bin_handle, ret = acl.rt.binary_load_from_data(mem_addr, length, options) |
Parameter |
Description |
|---|---|
mem_addr |
Int, address of the host memory for storing the operator binary data. The value cannot be null. |
length |
Int, memory size of the operator binary data, in bytes. The value must be greater than 0. |
options |
List, optional options for loading the operator binary file. For details about the structure, see aclrtBinaryLoadOptions. If the options are empty, set options to []. |
Return Value |
Description |
|---|---|
bin_handle |
Int, handle of the operator binary file. |
ret |
Int, 0 on success; else, failure. |