Function: pointer_get_attributes

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

Function Usage

Obtains the memory attribute information, including whether the memory is on the host or device and the page table size.

Prototype

  • C Prototype
    1
    aclError aclrtPointerGetAttributes(const void *ptr, aclrtPtrAttributes *attributes)
    
  • Python Function
    1
    attributes, ret = acl.rt.pointer_get_attributes(ptr)
    

Parameter Description

Parameter

Description

ptr

Int, memory address. Only the memory allocated by the pyacl APIs can be used.

Return Value Description

Return Value

Description

attributes

Dict, memory attributes. For details, see aclrtPtrAttributes.

ret

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