MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / write_to_file

Method write_to_file

lite/load_and_run/src/helpers/outdumper.cpp:25–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25void OutputDumper::write_to_file() {
26 if (!dump_file.empty()) {
27 for (auto&& info : m_infos) {
28 auto value = mgb::debug::dump_tensor(
29 info.hv,
30 mgb::ssprintf(
31 "var=%s owner_opr_inputs= %s", info.var_info.c_str(),
32 info.owner_inputs_info.c_str()));
33 mgb::debug::write_to_file(
34 mgb::ssprintf(
35 "%s/run%zu-var%zd", dump_file.c_str(), m_run_id, info.id)
36 .c_str(),
37 value);
38 }
39 }
40 m_run_id++;
41}

Callers 1

Calls 2

dump_tensorFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected