Class TextOprIODump

Inheritance Relationships

Base Type

Class Documentation

class mgb::TextOprIODump : public mgb::OprIODumpBase

dump opr input/output vars as text

In normal cases, the result would be written to the file at each execution. When comp_node_seq_record_level is set, the result would be written to file in destructor or when flush_lazy() is called.

Public Functions

TextOprIODump(cg::ComputingGraph *graph, const std::shared_ptr<FILE> &fout = std::shared_ptr< FILE >(stderr, [](FILE *) {}))
TextOprIODump(cg::ComputingGraph *graph, const char *fpath)
void flush_lazy() override

write lazy values due to comp_node_seq_record_level to file

Note: this is only effective when comp_node_seq_record_level is set. If compiled func is executed again without calling flush_lazy(), then previously recorded values would be overwritten and nothing would be recorded to file.

TextOprIODump &print_addr(bool flag)

set whether to print var address

TextOprIODump &max_size(size_t size)

set max number of entries to be printed for a single tensor