aclmdlRIGetStreams

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

Obtains the stream associated with a model running instance.

You can call this API twice to obtain all streams associated with a model running instance.

  1. First call: Pass a null pointer as streams and any non-negative integer as numStreams to aclmdlRIGetStreams to obtain the number of streams associated with the model running instance via numStreams.
  2. Second call: Allocate an array for streams with the size equal to the numStreams value from the first call. Then, pass streams and numStreams as inputs to aclmdlRIGetStreams to obtain all streams associated with the model running instance.

Prototype

1
aclError aclmdlRIGetStreams(aclmdlRI modelRI, aclrtStream *streams, uint32_t *numStreams)

Parameters

Parameter

Input/Output

Description

modelRI

Input

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

streams

Input/Output

If a null pointer is passed as streams, the number of streams associated with the model running instance is obtained. This number is returned via numStreams.

If an array with the size equal to the numStreams value is passed as streams, all streams associated with the model running instance are obtained. For details about the type definition, see aclrtStream.

numStreams

Input/Output

When used as an input, it indicates the array size of streams.

When used as an output, it indicates the number of streams associated with the model running instance.

Returns

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