File size: 608 Bytes
d1ceb73 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
#pragma once
#include <c10/util/Exception.h>
#include <ostream>
#include <string>
namespace at {
enum class BlasBackend : int8_t { Cublas, Cublaslt };
inline std::string BlasBackendToString(at::BlasBackend backend) {
switch (backend) {
case BlasBackend::Cublas:
return "at::BlasBackend::Cublas";
case BlasBackend::Cublaslt:
return "at::BlasBackend::Cublaslt";
default:
TORCH_CHECK(false, "Unknown blas backend");
}
}
inline std::ostream& operator<<(std::ostream& stream, at::BlasBackend backend) {
return stream << BlasBackendToString(backend);
}
} // namespace at
|