ActivityTraceInterface.h 846 B

123456789101112131415161718192021222324252627282930313233
  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 <memory>
  11. #include <string>
  12. #include <vector>
  13. namespace libkineto {
  14. struct ITraceActivity;
  15. class ActivityTraceInterface {
  16. public:
  17. virtual ~ActivityTraceInterface() = default;
  18. virtual const std::vector<const ITraceActivity*>* activities() {
  19. return nullptr;
  20. }
  21. virtual void save(const std::string& path) {}
  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)