Function: set_tensor_place_ment

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

Sets the placement attribute of a tensor description to identify whether the tensor memory is host memory or device memory.

Prototype

  • C Prototype
    1
    aclError aclSetTensorPlaceMent(aclTensorDesc *desc, aclMemType memType)
    
  • Python Function
    1
    ret = acl.set_tensor_place_ment(desc, mem_type)
    

Parameter Description

Parameter

Description

desc

Int, pointer address of the tensor description.

Call acl.create_tensor_desc in advance to create the tensor description of an operator input or output as the input of this API.

mem_type

Int, placement attribute value. For details about the value, see aclMemType.

Return Value Description

Return Value

Description

ret

Int, error code.