Relay op strategy #4644 makes two changes to AutoTVM:
- Removes the template key from AutoTVM template
- Unify the workload name and the task name into one flatten name.
Therefore, the old AutoTVM log won’t be able to use after this PR. Given that, we could also take this chance to improve the current log format.
The current Autotvm log format is
log_record: {
"i": [target, task_name, args, kwargs, workload, config], // change to "input"
"r": [costs, error_no, all_cost, timestamp], // change to "result"
"v": autotvm_log_version // change to "version"
}
config: {
"i": index, // change to "index"
"t": template_key, // remove
"c": code_hash, // change to "code_hash"
"e": [config_entity, ...] // change to "entity"
}
First, we should expand the one character into a full word to improve the readability, e.g., “i” -> “input”, as commented above, and remove the template key entry in the config json object.
Second, I want to discuss whether we should remove the workload
in the record. Previously the workload name (first item in the workload) is op name, which is different from Autotvm task name. Now they share the same name after #4644. Further both input
field and workload
have args and kwargs. So it seems redundant to keep both (task_name, args, kwargs)
and workload
in the log, and have both serialize_args
and args_to_workload
two serialization functions.
Third, do we have other things want to add/change in the log record?
Could you share your thoughts on this?
@tqchen @merrymercy @ziheng @kevinthesun @comaniac @vinx13 @jwfromm