masahi commented on code in PR #13050:
URL: https://github.com/apache/tvm/pull/13050#discussion_r995433150
##########
src/meta_schedule/database/database.cc:
##########
@@ -59,12 +60,8 @@ Workload Workload::FromJSON(const ObjectRef& json_obj) {
String b64_mod = Downcast<String>(json_array->at(1));
std::string json_mod = Base64Decode(b64_mod);
mod = Downcast<IRModule>(LoadJSON(json_mod));
+ std::stringstream(str_shash) >> shash;
}
- // Verify SHash(mod) == shash
- shash = tvm::StructuralHash()(mod);
- String recalc_shash = SHash2Str(shash);
- CHECK_EQ(recalc_shash, str_shash) << "ValueError: Structural hash changed.
Given: " << str_shash
- << "; Recalculated: " << recalc_shash;
Review Comment:
One way to restore hash verification is to do verification inside
`DatabaseNode` after `Workload::FromJSON` is called, since the database does
know what the `ModuleEquality` instance is supposed to be.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]