diff --git a/src/lang/data_layout.cc b/src/lang/data_layout.cc index 900a58029901..636820bbee9b 100644 --- a/src/lang/data_layout.cc +++ b/src/lang/data_layout.cc @@ -5,6 +5,7 @@ */ #include #include +#include namespace tvm { @@ -115,7 +116,7 @@ Layout::Layout(const std::string& name) { // NOLINT(*) char axis = v->var.get()->name_hint[0]; if (axis >= 'a' && axis <= 'z') { CHECK(exist_axis[axis-'a'+'A']) << "Invalid layout " << name << ": missing axis " - << axis - 'a' + 'A'; + << std::toupper(axis); } } }