HcclGetCommConfigCapability
Description
Checks whether the current software version supports the initialization configuration of a communicator.
For details about the all configuration options supported during communicator initialization, see HcclCommConfigCapability. To name but a few, the buffer size of the shared data, deterministic computing switch, and communicator name.
- Call the HcclGetCommConfigCapability API to obtain a value that represents the initialization configuration capability of the current software communicator.
- Compare the value with the enumerated value of a configuration option in HcclCommConfigCapability. If the value is greater than the enumerated value, the current software supports the configuration of the corresponding enumerated value in HcclCommConfigCapability. If the value is less than or equal to the enumerated value, the current software does not support the configuration.
For example, to determine whether the current software supports the configuration of a communicator name, compare the return value of the HcclGetCommConfigCapability API with the enumerated value HCCL_COMM_CONFIG_COMM_NAME. If the return value is greater than HCCL_COMM_CONFIG_COMM_NAME, the current software supports the configuration of a communicator name. If the return value is less than or equal to HCCL_COMM_CONFIG_COMM_NAME, the current software does not support the configuration of a communicator name.
Prototype
uint32_t HcclGetCommConfigCapability()
Parameters
None
Returns
uint32_t: value of the initial configuration capability of the communicator.
Constraints
None
Applicability
Example
1 2 | uint32_t configCapability = HcclGetCommConfigCapability(); bool isSupportCommName = configCapability > HCCL_COMM_CONFIG_COMM_NAME; // Determines whether the communicator name can be configured. If yes, the greater-than condition must be met. |