Recommended Service Configurations

This section provides recommended service configurations for common service scenarios of the Atlas A3 training product/Atlas A3 inference product and Atlas A2 training product/Atlas A2 inference product.

This section describes only the functions and configuration examples of recommended environment variables. For details, see Collective Communication in Environment Variables.

Atlas A3 training product/Atlas A3 inference product

  • Training scenario

    Environment Variable

    Description

    HCCL_CONNECT_TIMEOUT

    Timeout period for establishing a socket connection. The default value is 120, in seconds. In this scenario, you are advised to adjust the connection setup timeout period based on the network scale.
    export HCCL_CONNECT_TIMEOUT=1200

    HCCL_OP_EXPANSION_MODE

    Expansion mode of the communication operator.

    In this scenario, you are advised to retain the default value AI_CPU, indicating that the communication operator is expanded on AICPU.

    export HCCL_OP_EXPANSION_MODE="AI_CPU"
  • Inference
    • Prefill-Decode hybrid deployment

      Environment Variable

      Description

      HCCL_OP_EXPANSION_MODE

      Expansion mode of the communication operator.

      In this scenario, you are advised to set this parameter to AIV, indicating that the communication operator is expanded on the Vector Core.

      export HCCL_OP_EXPANSION_MODE="AIV"

      HCCL_DETERMINISTIC

      Controls whether to enable deterministic computing. Set this field based on the usage scenario. The default value is false, indicating that deterministic computing is disabled.

      export HCCL_DETERMINISTIC=false
    • Prefill-Decode separated deployment

      Environment Variable

      Description

      HCCL_INTRA_ROCE_ENABLE

      When only LLM-DataDist is used as the cluster management component, you are advised to use this environment variable to configure RoCE links for communication within a SuperPoD. In non-LLM-DataDist scenarios, you do not need to set this environment variable.

      export HCCL_INTRA_ROCE_ENABLE=1

      HCCL_OP_EXPANSION_MODE

      Expansion mode of the communication operator.

      In this scenario, you are advised to set this parameter to AIV, indicating that the communication operator is expanded on the Vector Core.

      export HCCL_OP_EXPANSION_MODE="AIV"

      HCCL_DETERMINISTIC

      Controls whether to enable deterministic computing. Set this field based on the usage scenario. The default value is false, indicating that deterministic computing is disabled.

      export HCCL_DETERMINISTIC=false
  • RL training and inference integration

    Environment Variable

    Description

    HCCL_CONNECT_TIMEOUT

    Timeout period for establishing a socket connection. The default value is 120, in seconds. In this scenario, you are advised to adjust the connection setup timeout period based on the network scale.

    export HCCL_CONNECT_TIMEOUT=1200

    HCCL_OP_EXPANSION_MODE

    Expansion mode of the communication operator.

    In this scenario, you are advised to retain the default value AI_CPU, indicating that the communication operator is expanded on AICPU.

    export HCCL_OP_EXPANSION_MODE="AI_CPU"

    Note:

    For the inference communicator, you need to set the operator expansion location of the inference communicator to Vector Core through the communicator-level parameter. For the PyTorch framework network, you can set the expansion location using the hccl_op_expansion_mode parameter as follows:

    options = torch_npu._C._distributed_c10d.ProcessGroupHCCL.Options()
    options.hccl_config ={"hccl_op_expansion_mode":3}
    torch.distributed.init_process_group(backend="hccl", pg_options=options)

    For details about PyTorch framework parameters, see Setting HCCL Communicator Parameters Using pg_options in the Ascend Extension for PyTorch Framework Feature Guide.

    HCCL_DETERMINISTIC

    Controls whether to enable deterministic computing. Set this field based on the usage scenario. The default value is false, indicating that deterministic computing is disabled.

    export HCCL_DETERMINISTIC=false

Atlas A2 training product/Atlas A2 inference product

  • Training scenario

    Environment Variable

    Description

    HCCL_CONNECT_TIMEOUT

    Timeout period for establishing a socket connection. The default value is 120, in seconds. In this scenario, you are advised to adjust the connection setup timeout period based on the network scale.
    export HCCL_CONNECT_TIMEOUT=1200

    HCCL_OP_EXPANSION_MODE

    Expansion mode of the communication operator.

    In this scenario, you are advised to retain the default value HOST, indicating that the communication operator is expanded on the host CPU.

    export HCCL_OP_EXPANSION_MODE="HOST"

    HCCL_DETERMINISTIC

    Controls whether to enable deterministic computing. Set this field based on the usage scenario. The default value is false, indicating that deterministic computing is disabled.

    export HCCL_DETERMINISTIC=false
  • Inference

    Environment Variable

    Description

    HCCL_OP_EXPANSION_MODE

    Expansion mode of the communication operator.

    In this scenario, you are advised to retain the default value HOST, indicating that the communication operator is expanded on the host CPU.

    export HCCL_OP_EXPANSION_MODE="HOST"

    HCCL_DETERMINISTIC

    Controls whether to enable deterministic computing. Set this field based on the usage scenario. The default value is false, indicating that deterministic computing is disabled.

    export HCCL_DETERMINISTIC=false
  • RL training and inference integration

    Environment Variable

    Description

    HCCL_CONNECT_TIMEOUT

    Timeout period for establishing a socket connection. The default value is 120, in seconds. In this scenario, you are advised to adjust the connection setup timeout period based on the network scale.

    export HCCL_CONNECT_TIMEOUT=1200

    HCCL_OP_EXPANSION_MODE

    Expansion mode of the communication operator.

    In this scenario, you are advised to retain the default value HOST, indicating that the communication operator is expanded on the host CPU.

    export HCCL_OP_EXPANSION_MODE="HOST"

    HCCL_DETERMINISTIC

    Controls whether to enable deterministic computing. Set this field based on the usage scenario. The default value is false, indicating that deterministic computing is disabled.

    export HCCL_DETERMINISTIC=false