Traktor/myenv/Lib/site-packages/torch/include/ATen/LinalgBackend.h

32 lines
719 B
C
Raw Normal View History

2024-05-23 01:57:24 +02:00
#pragma once
#include <c10/util/Exception.h>
#include <ostream>
#include <string>
namespace at {
enum class LinalgBackend : int8_t { Default, Cusolver, Magma };
inline std::string LinalgBackendToString(at::LinalgBackend backend) {
switch (backend) {
case LinalgBackend::Default:
return "at::LinalgBackend::Default";
case LinalgBackend::Cusolver:
return "at::LinalgBackend::Cusolver";
case LinalgBackend::Magma:
return "at::LinalgBackend::Magma";
default:
TORCH_CHECK(false, "Unknown linalg backend");
}
}
inline std::ostream& operator<<(
std::ostream& stream,
at::LinalgBackend backend) {
return stream << LinalgBackendToString(backend);
}
} // namespace at