| 23 | } |
| 24 | |
| 25 | void 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 | } |
no test coverage detected