Function: set_tensor_place_ment

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

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)
    

Parameters

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.

Returns

Return Value

Description

ret

Int, error code.