ParallelNative.h 546 B

1234567891011121314151617181920
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <c10/util/Exception.h>
  4. #define INTRA_OP_PARALLEL
  5. namespace at::internal {
  6. TORCH_API void invoke_parallel(
  7. const int64_t begin,
  8. const int64_t end,
  9. const int64_t grain_size,
  10. const std::function<void(int64_t, int64_t)>& f);
  11. } // namespace at::internal
  12. #else
  13. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  14. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)