Function: pointer_get_attributes

Applicability

Product

Supported

Atlas 350 Accelerator Card

x

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

Description

Obtains memory attributes, including whether the memory is located 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)
    

Parameters

Parameter

Description

ptr

Int, memory address.

Return Value

Return Value

Description

attributes

Dict, memory attributes. For details, see aclrtPtrAttributes.

ret

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