Function: allocator_unregister
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
x |
Function Usage
Deregisters the user-provided Allocator and its callback function, so that the Allocator cannot be used.
Prototype
- C Prototype
1aclError aclrtAllocatorUnregister(aclrtStream stream)
- Python Function
1ret = acl.rt.allocator_unregister(stream)
Parameter Description
|
Parameter |
Description |
|---|---|
|
stream |
Int, stream corresponding to the Allocator. |
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |
Restrictions
- Atlas 200/500 A2 Inference Product: This API is not supported.
- Before destroying an Allocator, call this API to deregister the Allocator.
- If the stream to be deregistered does not exist or this API is called for multiple times to deregister the stream, no operation will be performed and a success message is returned.
Parent topic: Memory Management