merrymercy commented on a change in pull request #7156:
URL: https://github.com/apache/tvm/pull/7156#discussion_r548525776
##########
File path: src/auto_scheduler/measure_record.cc
##########
@@ -182,6 +184,10 @@ struct Handler<::tvm::auto_scheduler::SearchTaskNode> {
reader->Read(&str_value);
data->target = ::tvm::Target(str_value);
s = reader->NextArrayItem();
+ ICHECK(s);
+ reader->Read(&int_value);
+ data->layout_rewrite_option =
::tvm::auto_scheduler::LayoutRewriteOption(int_value);
+ s = reader->NextArrayItem();
Review comment:
I see. We should fix this by
```
if (data.target_host.defined()) {
writer->WriteArrayItem(data.target_host->str());
} else {
writer->WriteArrayItem("");
}
```
We can make sure that new writer always writes all fields into the file. But
the new reader can read old logs with some fileds missing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]