HcommThreadFree

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

x

Atlas A2 training product/Atlas A2 inference product

x

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Function

Destroys threads allocated by the HcommThreadAlloc API.

Prototype

1
HcommResult HcommThreadFree(const ThreadHandle* threads, uint32_t threadNum)

Parameters

Parameter

Input/Output

Description

threads

Input

Communication thread handles.

For details, see ThreadHandle.

threadNum

Input

Number of communication threads.

Returns

HcommResult: 0 on success; else, failure.

Restrictions

This API can only destroy threads allocated by the HcommThreadAlloc API.

Example

1
2
3
ThreadHandle thread[2];
HcommResult ret =  HcommThreadAlloc(COMM_ENGINE_AICPU_TS, 2, 3, thread);
HcommResult ret =  HcommThreadFree(thread, 2);