1 #include <ATen/miopen/Types.h> 4 #include <miopen/version.h> 6 namespace at {
namespace native {
8 miopenDataType_t getMiopenDataType(
const at::Tensor& tensor) {
9 if (tensor.scalar_type() == at::kFloat) {
11 }
else if (tensor.scalar_type() == at::kHalf) {
14 std::string msg(
"getMiopenDataType() not supported for ");
15 msg += toString(tensor.scalar_type());
16 throw std::runtime_error(msg);
19 int64_t miopen_version() {
20 return (MIOPEN_VERSION_MAJOR<<8) + (MIOPEN_VERSION_MINOR<<4) + MIOPEN_VERSION_PATCH;
Flush-To-Zero and Denormals-Are-Zero mode.