Closed hecmay closed 3 years ago
This issue is too ambiguous. Which file are you referring to? Which function raises the bug? Sometimes we write the logic in that way because we are certain that the .at
will not cause any out_of_bound
issue.
The error happens in CodeGenC tvm/src/codegen/codegen_c.cc
's IR Printer for Allocate.
You are right, but when I created a reducer in the HeteroCL module, I did not see the AttrStmt attached to the Allocate statement of the reducer. And this leads to the SegFault, which took me quite a long time to locate where the error was located. Quite painful debugging experience to me...
Let's add a regression test case for each bug. I suggest we create subfolders under 'tests'
I agree, but this would require some work though. The reason is some code is from TVM's codebase. For example, the C++ code here was written by TVM. And unfortunately, we are out of sync with TVM. So even if TVM already fixed some bugs, we would not be able to reuse them.
@Hecmay please see if the bug is still there.
@seanlatias Already fixed.
The error occurs when the user tries to create an
Allocate
statement without specifying the storage scope (some other issues can lead to the same error message).The complete error message from HetroCL is too ambiguous to pinpoint the issue:
The error is caused by looking up a not existing entry in the map
Adding a check statement before the lookup can provide more detailed error message