aclrtCacheLastTaskExtendInfo

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

☓

Atlas inference products

√

Atlas training products

☓

Function

Caches the custom extension information in the specified memory to the last task delivered in the current thread based on the size specified by infoSize.

You can later call aclmdlRIDebugJsonPrint to export this custom extension information to a file in JSON format and view it in tracing mode (for example, chrome://tracing/). Currently, this API can only be used in scenarios involving model capture (see aclmdlRICaptureBegin) or model running instance building (see aclmdlRIBuildBegin).

Prototype

1
aclError aclrtCacheLastTaskExtendInfo(const char* const extendInfoPtr, const size_t infoSize)

Parameters

Parameter

Input/Output

Description

extendInfoPtr

Input

Pointer to the memory address of the custom extension information. This refers to the host memory. The content in the memory to which extendInfoPtr points must be a JSON string encoded using UTF-8. If the JSON string is not UTF-8 encoded, undefined behavior may occur when aclmdlRIDebugJsonPrint is later called.

infoSize

Input

Size of the memory for storing custom extention information, in bytes. The value range is (0, 4K]. When infoSize exceeds 4 KB, only the first 4 KB bytes are cached.

Returns

0 on success; otherwise, failure. For details, see aclError.