ArrayAttr

Applicable Products

For details about the mapping between AI processors and Ascend products, see Ascend Product Overview.

Product

Supported

Atlas A3 training products/Atlas A3 inference products

x

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

x

Atlas inference products

√

Atlas training products

x

For the Atlas A2 training products/Atlas A2 inference products, only Atlas 800I A2 inference products are supported.

For the Atlas inference products, only the Atlas 300I Duo inference card and Atlas 800 inference server (model 3000) are supported.

Function

Adds an array attribute through a callback function.

Prototype

1
2
template <Level levelAttr = level, typename T>
Profiler &ArrayAttr(const char *attrName, const T &startIter, const T &endIter, typename ArrayCollectorHelper<Profiler<level>, T>::AttrCollectCallback callback)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

attrName

Input

Attribute name.

startIter

Input

Start of any iterator.

endIter

Input

End of any iterator.

callback

Input

The callback function requires two input parameters: the first is the current object for adding attributes, and the second is the current iterator for retrieving the attribute content to record.

Returns

Profiler &Current object. Chain calls are supported.