aclmdlRICaptureToModelRIBegin

Note: This API is for trial use and may be changed in later versions. It is not available in production environments.

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

Starts capturing tasks delivered to a stream.

Unlike aclmdlRICaptureBegin, this API can allocate captured tasks to a specified model running instance.

Prototype

aclError aclmdlRICaptureToModelRIBegin(aclrtStream stream, aclmdlRI modelRI, aclmdlRICaptureMode mode)

Parameters

Parameter

Input/Output

Description

stream

Input

Stream. For details about the type definition, see aclrtStream.

modelRI

Input

Model running instance. For details about the type definition, see aclmdlRI.

mode

Input

Capture mode. This mode is used to limit the scope of unsafe functions, including aclrtMemset, aclrtMemcpy, aclrtMemcpy2d, and APIs (such as aclrtMemcpyAsync) that use non-page-locked host memory for asynchronous memory copy.

For details about the type definition, see aclmdlRICaptureMode.

Returns

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