aclrtCreateStreamV2

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

X

Atlas A3 training products/Atlas A3 inference products

X

Atlas A2 training products/Atlas A2 inference products

X

Atlas 200I/500 A2 inference products

X

Atlas inference products

X

Atlas training products

X

Function

Creates a stream (max: four streams). Stream configurations can be added during stream creation.

This API must be used together with other APIs to create a stream. The API call sequence is as follows:
  1. Call aclrtCreateStreamConfigHandle to create a stream configuration object.
  2. Call aclrtSetStreamConfigOpt multiple times to set the value of each attribute in the configuration object.
  3. Call aclrtCreateStreamV2 to create a stream.
  4. After the stream is used, call aclrtDestroyStreamConfigHandle to destroy the stream configuration object and call aclrtDestroyStream to destroy the stream.

Prototype

1
aclError aclrtCreateStreamV2(aclrtStream *stream, const aclrtStreamConfigHandle *handle)

Parameters

Parameter

Input/Output

Description

stream

Output

Pointer to the stream. For details about the type definition, see aclrtStream.

handle

Input

Pointer to the stream configuration object. For details about the type definition, see aclrtStreamConfigHandle.

The value must be the same as the handle value in aclrtSetStreamConfigOpt.

Returns

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