SDPBackend.h 507 B

123456789101112131415161718192021
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <cstdint>
  4. namespace at {
  5. constexpr int32_t num_sdp_backends = 5;
  6. enum class SDPBackend {
  7. error = -1,
  8. math = 0,
  9. flash_attention = 1,
  10. efficient_attention = 2,
  11. cudnn_attention = 3,
  12. overrideable = 4
  13. };
  14. } // namespace at
  15. #else
  16. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  17. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)