SetRole
Applicability
Product |
Supported (√/x) |
|---|---|
Atlas 350 Accelerator Card |
x |
√ |
|
√ |
|
x |
|
x |
|
x |
Note: For
Function Description
Sets the role of the LLM-DataDist.
Prototype
1 | Status SetRole(LlmRole role, const std::map<AscendString, AscendString> &options = {}) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
role |
Input |
Role type. For details about the options, see LlmRole. |
options |
Input |
Role parameters. For details about the supported parameters, see Table 1. |
Configuration Item |
Optional/Mandatory |
Description |
|---|---|---|
OPTION_LISTEN_IP_INFO |
Optional |
|
Example
Click Gitee, download the sample package of the matching version based on the tag name, and obtain the sample from the cplusplus/level1_single_api/11_llm_data_dist directory.
Returns
- LLM_SUCCESS: The role is set successfully.
- LLM_PARAM_INVALID: Incorrect parameter.
- LLM_EXIST_LINK: Residual link resources exist.
- Other values: Failure.
Exception Handling
None
Restrictions
Before using this API, disconnect the link from the current DataDist.