MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / LoadTimeDataset

Function LoadTimeDataset

oneflow/core/vm/remat/util.cpp:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86using json = nlohmann::json;
87
88json LoadTimeDataset() {
89 json j;
90 if (const char* c = std::getenv("ONEFLOW_REMAT_OP_TIME_DATASET")) {
91 std::ifstream i(c);
92 i >> j;
93 i.close();
94 }
95 json new_j;
96
97 for (json::iterator iter = j.begin(); iter != j.end(); ++iter) {
98 new_j[SortKey(iter.key())] = iter.value();
99 }
100 return new_j;
101}
102
103Maybe<double> GetDatasetComputeTime(const json& j, const vm::OpCallInstructionPolicy& operand) {
104 const std::vector<std::string> zero_time_list{

Callers 1

GetComputeTimeFunction · 0.85

Calls 6

SortKeyFunction · 0.85
closeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
keyMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected