Skip to content

Commit

Permalink
Use a uint64_t to serialize primitive_attrs in the Relay VM to fix 32…
Browse files Browse the repository at this point in the history
…bit RPC (#9169)
  • Loading branch information
Matthew Brookhart authored Oct 1, 2021
1 parent de04d83 commit 61fbda9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/vm/executable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void Executable::SavePrimitiveOpNames(dmlc::Stream* strm) {
primitive_names[packed_index] = it.first;
}
strm->Write(primitive_names);
std::map<size_t, std::map<std::string, std::string>> primitive_attrs;
std::map<uint64_t, std::map<std::string, std::string>> primitive_attrs;
for (const auto& it : this->op_attrs) {
auto packed_index = static_cast<size_t>(it.first);
std::map<std::string, std::string> attrs;
Expand Down Expand Up @@ -584,7 +584,7 @@ void Executable::LoadPrimitiveOpNames(dmlc::Stream* strm) {
this->primitive_map.insert({primitive_names[i], i});
}

std::map<size_t, std::map<std::string, std::string>> primitive_attrs;
std::map<uint64_t, std::map<std::string, std::string>> primitive_attrs;
STREAM_CHECK(strm->Read(&primitive_attrs), "primitive attrs");
for (const auto& fn : primitive_attrs) {
std::vector<std::pair<String, ObjectRef>> attrs;
Expand Down

0 comments on commit 61fbda9

Please sign in to comment.