aclrtGetPrimaryCtxState

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

Obtains the status of the default context.

Prototype

1
aclError aclrtGetPrimaryCtxState(int32_t deviceId, uint32_t *flags, int32_t *active)

Parameters

Parameter

Input/Output

Description

deviceId

Input

ID of the device on which the default context is to be obtained.

Must be in the range of [0, Device count – 1]. Call aclrtGetDeviceCount to obtain the device count.

flags

Output

Reserved parameter. Currently, the value is fixed to NULL.

active

Output

Pointer to the status of the default context.

The status values are as follows:

  • 0: not activated
  • 1: activated

Returns

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