Function: allocator_unregister

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

x

Description

Deregisters the user-provided Allocator and its callback function, so that the Allocator cannot be used.

Prototype

  • C Prototype
    1
    aclError aclrtAllocatorUnregister(aclrtStream stream)
    
  • Python Function
    1
    ret = acl.rt.allocator_unregister(stream)
    

Parameters

Parameter

Description

stream

Int, stream corresponding to the Allocator.

Return Value

Return Value

Description

ret

Int, error code. 0 on success; else, failure.

Restrictions

  • The Atlas 200/500 A2 Inference Product does not support this API.
  • 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.

Reference

For the API call example, see Dynamic Shape Input (Setting the Shape Range).