|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
x |
Registers the user-provided Allocator and its callback function, so that the Allocator can be used.
1
|
aclError aclrtAllocatorRegister(aclrtStream stream, aclrtAllocatorDesc allocatorDesc ) |
1
|
ret = acl.rt.allocator_register(stream, allocatorDesc) |
|
Parameter |
Description |
|---|---|
|
stream |
Int, stream to be registered by the Allocator. The value cannot be NULL. Otherwise, an error is reported. |
|
allocatorDesc |
Int, pointer address of the allocator descriptor. |
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code. 0 on success; else, failure. |
In the single-operator model scenario, call this API before executing an API (such as acl.op.execute_v2).
In the dynamic-shape model inference scenario, call this API together with aclmdlExecuteAsync, and this API must be called before aclmdlExecuteAsync.
For details about the API call example, see Dynamic Shape Input (Setting the Shape Range).