constants.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. '''Copyright The Microsoft DeepSpeed Team'''
  2. """
  3. Copyright (c) Microsoft Corporation
  4. Licensed under the MIT license.
  5. """
  6. #########################################
  7. # flops profiler
  8. #########################################
  9. # Flops profiler. By default, this feature is not enabled.
  10. # Users can configure in ds_config.json as below example:
  11. FLOPS_PROFILER_FORMAT = '''
  12. flops profiler should be enabled as:
  13. "session_params": {
  14. "flops_profiler": {
  15. "enabled": true,
  16. "profile_step": 1,
  17. "module_depth": -1,
  18. "top_modules": 3,
  19. "detailed": true,
  20. "output_file": null
  21. }
  22. }
  23. '''
  24. FLOPS_PROFILER = "flops_profiler"
  25. FLOPS_PROFILER_ENABLED = "enabled"
  26. FLOPS_PROFILER_ENABLED_DEFAULT = False
  27. FLOPS_PROFILER_PROFILE_STEP = "profile_step"
  28. FLOPS_PROFILER_PROFILE_STEP_DEFAULT = 1
  29. FLOPS_PROFILER_MODULE_DEPTH = "module_depth"
  30. FLOPS_PROFILER_MODULE_DEPTH_DEFAULT = -1
  31. FLOPS_PROFILER_TOP_MODULES = "top_modules"
  32. FLOPS_PROFILER_TOP_MODULES_DEFAULT = 1
  33. FLOPS_PROFILER_DETAILED = "detailed"
  34. FLOPS_PROFILER_DETAILED_DEFAULT = True
  35. FLOPS_PROFILER_OUTPUT_FILE = "output_file"
  36. FLOPS_PROFILER_OUTPUT_FILE_DEFAULT = None