HcclGetHcclBuffer
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
x |
|
x |
|
x |
For
Function
Obtains the HCCL communication memory in the communicator. Memory will be initialized and allocated on the device during the first call; subsequent calls will reuse the allocated memory without reinitialization.
Prototype
1 | HcclResult HcclGetHcclBuffer(HcclComm comm, void **buffer, uint64_t *size) |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
comm |
Input |
Communicator. The HcclComm type is defined as follows:
|
||
buffer |
Output |
HCCL communication memory address. |
||
size |
Output |
HCCL communication memory size. The memory size is twice the initial configuration of the communicator or the value of HCCL_BUFFSIZE. The default size is 400 MB. |
Returns
HcclResult: HCCL_SUCCESS on success, or else failure.
Restrictions
The returned buffer memory is managed by the library and cannot be released by the caller.
Example
1 2 3 4 | HcclComm comm; void *hcclBuffer = nullptr; uint64_t hcclBufferSize = 0; HcclResult result = HcclGetHcclBuffer(comm, &hcclBuffer, &hcclBufferSize); |