Skip to content

Commit

Permalink
Fix error reporting for missing axis (apache#2835)
Browse files Browse the repository at this point in the history
* Fix error reporting for missing axis

* Update data_layout.cc
  • Loading branch information
MarisaKirisame authored and wweic committed Mar 24, 2019
1 parent 495b52c commit c4a63d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lang/data_layout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
#include <tvm/data_layout.h>
#include <tvm/ir_pass.h>
#include <cctype>

namespace tvm {

Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit c4a63d1

Please sign in to comment.