Initialize
Applicable Products
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
x |
|
|
x |
|
|
x |
Note: For
Function Description
Initializes an AdxlEngine instance. This API must be called before other APIs are called.
Prototype
1
|
Status Initialize(const AscendString &local_engine, const std::map<AscendString, AscendString> &options) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
local_engine |
Input |
AdxlEngine identifier, which must be unique among all participants in the link establishment. The value is in the format of host_ip:host_port or host_ip. You are advised not to set this parameter to a loopback IP address, as it may lead to conflicts in scenarios involving multiple AdxlEngine instances. If host_port is set and its value is greater than 0, the current AdxlEngine instance functions as the server and needs to listen on the specified port. If host_port is not set or its value is less than or equal to 0, the current HIXL instance functions as the client and will not start listening. |
|
options |
Input |
Initialization parameter values. For details, see Table 1. |
|
Parameter |
Optional/Mandatory |
Description |
|---|---|---|
|
OPTION_BUFFER_POOL |
Optional |
String value "BufferPool". Intermediate buffer is required for transmission when:
This parameter can be used to configure the size of the relay memory pool. The value format is "$BUFFER_NUM:$BUFFER_SIZE", with the system default being "4:8" (unit: MB). You can disable the relay memory pool by configuring it to "0:0". In concurrency scenarios, you are advised to increase the value of $BUFFER_NUM. Additionally, the same value must be configured wherever it is used. |
|
OPTION_RDMA_TRAFFIC_CLASS |
Optional |
String value "RdmaTrafficClass". This parameter specifies the traffic class of the RDMA NIC. If both this parameter and the environment variable HCCL_RDMA_TC are configured, this parameter takes precedence. If only one of them is configured, the configured one takes effect. Its value ranges from 0 to 255 and must be an integral multiple of 4. The default value is 132. |
|
OPTION_RDMA_SERVICE_LEVEL |
Optional |
String value "RdmaServiceLevel". This parameter specifies the service level of the RDMA NIC. It has the same functionality as the environment variable HCCL_RDMA_SL. If both are configured, this parameter takes precedence. If only one of them is configured, the configured one takes effect. The value range is [0, 7]. The default value is 4. |
Returns
- SUCCESS: Success.
- PARAM_INVALID: Incorrect parameter.
- Other values: Failure.
Exception Handling
None