constants.py 1.1 KB

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