ParallelFuture.h 553 B

123456789101112131415161718
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <ATen/core/ivalue.h>
  4. #include <c10/macros/Macros.h>
  5. #include <functional>
  6. namespace at {
  7. // Launches intra-op parallel task, returns a future
  8. TORCH_API c10::intrusive_ptr<c10::ivalue::Future> intraop_launch_future(
  9. const std::function<void()>& func);
  10. } // namespace at
  11. #else
  12. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  13. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)