operator()

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 200I/500 A2 inference product

x

Atlas inference product AI Core

x

Atlas inference product Vector Core

x

Atlas training product

x

Function Usage

Obtains the reference of an element numbered as index.

It is similar to operator() in LocalTensor.

Prototype

1
__aicore__ inline __inout_pipe__(S) __gm__ PrimType& operator()(const uint64_t offset) const

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

offset

Input

Subscript index of the GlobalTensor.

Returns

Returns the PrimType reference of the element at the specified index.

PrimType is defined as follows:

1
2
// PrimT is used to extract the basic data type from T. If T is of the basic data type, the data type is directly returned. If T is of the TensorTrait type, the LiteType basic data type in TensorTrait is extracted.
using PrimType = PrimT<T>;

Restrictions

None