SetUserTag

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product AI Core

Atlas inference product Vector Core

Atlas training product

Function Usage

Adds user-defined information to a tensor. You can set the corresponding tag as required. You can use GetUserTag to obtain the tag information of a specified tensor and perform operations on the tensor based on the tag information.

Prototype

1
__aicore__ inline void SetUserTag(const TTagType tag)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

tag

Input

Tag information. The type TTagType corresponds to int32_t.

Returns

None

Restrictions

None

Examples

// Example
AscendC::TTagType tag = 10;
inputLocal.SetUserTag(tag); // Set tag information for the LocalTensor.