Sleep.h 573 B

123456789101112131415161718
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <c10/macros/Export.h>
  4. #include <cstdint>
  5. namespace at::cuda {
  6. // enqueues a kernel that spins for the specified number of cycles
  7. TORCH_CUDA_CU_API void sleep(int64_t cycles);
  8. // flushes instruction cache for ROCm; no-op for CUDA
  9. TORCH_CUDA_CU_API void flush_icache();
  10. } // namespace at::cuda
  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)