GetSize

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

Obtains the size of the current LocalTensor.

Prototype

1
__aicore__ inline uint32_t GetSize() const

Parameters

None

Returns

Returns the size of the current LocalTensor. The unit is element.

Restrictions

None

Examples

See Examples.

1
2
3
4
// Example
auto size = inputLocal.GetSize(); // Obtain the length of inputLocal. The size is the number of elements in inputLocal.
// The result is as follows:
// The size is srcLen, 256.