From c4a63d15b81538833cf3cf3f549c379a035deaf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=BE=E9=9B=A8=E9=AD=94=E7=90=86=E6=B2=99?= Date: Wed, 20 Mar 2019 18:46:15 -0700 Subject: [PATCH] Fix error reporting for missing axis (#2835) * Fix error reporting for missing axis * Update data_layout.cc --- src/lang/data_layout.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } }