Traktor/myenv/Lib/site-packages/torch/include/ATen/LinalgBackend.h
2024-05-26 05:12:46 +02:00

32 lines
719 B
C++

#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