constants.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright (c) Microsoft Corporation.
  2. # SPDX-License-Identifier: Apache-2.0
  3. # DeepSpeed Team
  4. NCCL_BACKEND = 'nccl'
  5. CCL_BACKEND = 'ccl'
  6. MPI_BACKEND = 'mpi'
  7. GLOO_BACKEND = 'gloo'
  8. SCCL_BACKEND = 'sccl'
  9. HCCL_BACKEND = 'hccl'
  10. DEFAULT_AML_MASTER_PORT = "54965"
  11. DEFAULT_AML_NCCL_SOCKET_IFNAME = "^docker0,lo"
  12. #########################################
  13. # Comms Logger
  14. #########################################
  15. # Comms Logger. By default, this feature is not enabled.
  16. # Users can configure in ds_config.json as below example:
  17. COMMS_LOGGER_FORMAT = '''
  18. The Comms Logger can be specified as:
  19. "comms_logger": {
  20. "enabled": true,
  21. "verbose": false,
  22. "prof_all": true,
  23. "debug": false,
  24. "prof_ops": ["all_reduce", "custom_all_reduce_name"]
  25. }
  26. '''
  27. COMMS_LOGGER = "comms_logger"
  28. # Comms logger enable signal
  29. COMMS_LOGGER_ENABLED = "enabled"
  30. COMMS_LOGGER_ENABLED_DEFAULT = False
  31. # Comms logger verbose signal
  32. COMMS_LOGGER_VERBOSE = "verbose"
  33. COMMS_LOGGER_VERBOSE_DEFAULT = False
  34. # comms logger profile all ops signal
  35. COMMS_LOGGER_PROF_ALL = "prof_all"
  36. COMMS_LOGGER_PROF_ALL_DEFAULT = True
  37. # comms logger show all ops signal
  38. COMMS_LOGGER_DEBUG = "debug"
  39. COMMS_LOGGER_DEBUG_DEFAULT = False
  40. # comms logger profile specific ops in list
  41. COMMS_LOGGER_PROF_OPS = "prof_ops"
  42. COMMS_LOGGER_PROF_OPS_DEFAULT = []