junrushao commented on code in PR #15673:
URL: https://github.com/apache/tvm/pull/15673#discussion_r1316421990
##########
src/runtime/disco/loader.cc:
##########
@@ -93,9 +93,18 @@ inline std::vector<ShapeTuple::index_type> ShardShape(const
ShapeTuple& shape, i
return result;
}
+class ShardInfoCompare {
+ public:
+ bool operator()(const ShardLoaderObj::ShardInfo& a, const
ShardLoaderObj::ShardInfo& b) const {
+ int a_id = std::stoi(a.param->name.substr(6));
+ int b_id = std::stoi(b.param->name.substr(6));
+ return a_id < b_id;
Review Comment:
you don't need an actual "sort", instead you may retrieve the parameter
names in ndarray-cache-metadata and calculate their names correspondingly by
"params_0", "params_1", etc
--
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]