ClientInterface.h 919 B

12345678910111213141516171819202122232425262728293031
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. /*
  3. * Copyright (c) Meta Platforms, Inc. and affiliates.
  4. * All rights reserved.
  5. *
  6. * This source code is licensed under the BSD-style license found in the
  7. * LICENSE file in the root directory of this source tree.
  8. */
  9. #pragma once
  10. #include <string>
  11. namespace libkineto {
  12. class ClientInterface {
  13. public:
  14. virtual ~ClientInterface() = default;
  15. virtual void init() = 0;
  16. virtual void prepare(bool, bool, bool, bool, bool) = 0;
  17. virtual void start() = 0;
  18. virtual void stop() = 0;
  19. virtual void start_memory_profile() = 0;
  20. virtual void stop_memory_profile() = 0;
  21. virtual void export_memory_profile(const std::string&) = 0;
  22. };
  23. } // namespace libkineto
  24. #else
  25. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  26. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)