Function: allocator_unregister

Applicability

Product

Supported (√/x)

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

x

Function Usage

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)
    

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.

Reference

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