PeerToPeerAccess.h 571 B

1234567891011121314151617181920
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <c10/core/Device.h>
  4. #include <c10/macros/Macros.h>
  5. namespace at::xpu {
  6. namespace detail {
  7. void init_p2p_access_cache(c10::DeviceIndex num_devices);
  8. } // namespace detail
  9. TORCH_XPU_API bool get_p2p_access(
  10. c10::DeviceIndex dev,
  11. c10::DeviceIndex dev_to_access);
  12. } // namespace at::xpu
  13. #else
  14. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  15. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)