DisconnectAsync

Applicable Products

Product

Supported (√/x)

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

x

Atlas inference products

x

Atlas training products

x

Note: For Atlas A2 training products / Atlas A2 inference products , only the Atlas 800I A2 inference server and A200I A2 Box heterogeneous subrack are supported.

Function Description

Disconnects a link asynchronously with the remote HIXL instance.

Prototype

1
Status DisconnectAsync(const AscendString &remote_engine, int32_t timeout_in_millis = 1000)

Parameters

Parameter

Input/Output

Description

remote_engine

Input

Unique identifier of the remote HIXL instance.

timeout_in_millis

Input

Link disconnection timeout interval, in milliseconds. The default value is 1000.

Example

Click GitCode, select the matching version, and obtain the sample from the examples/cpp directory.

Returns

  • SUCCESS: Success.
  • RESOURCE_EXHAUSTED: The task queue is full.
  • Other values: Failure.

Constraints

  • The number of threads in the thread pool and the length of the task queue are configured through the Initialize API of HIXL. The following is an example:
     "GlobalResourceConfig": "{"connect_pool.thread_num":"2","connect_pool.task_queue_capacity":"256"}"
  • The ConnectAsync and DisconnectAsync APIs cannot be used together with the Connect and Disconnect APIs.
  • Tasks delivered by users are executed in sequence. If multiple tasks are delivered to the same remote_engine, the remote_engine executes these tasks in sequence and obtains the status of the latest delivered task.