Class GraphDumper

Nested Relationships

Class Documentation

class mgb::serialization::GraphDumper

dump graph into given output file

Public Types

using DumpConfig = GraphDumpConfig

Public Functions

~GraphDumper() = default
DumpResult dump(const SymbolVarArray &output_vars, const DumpConfig &config = {}) = 0
GraphDumpFormat format() const = 0

Public Static Functions

std::unique_ptr<GraphDumper> make(std::unique_ptr<OutputFile> file, GraphDumpFormat format = {})
bool should_remove_in_dump(cg::OperatorNodeBase *opr)

whether an operator should be removed in graph serialization file

struct DumpResult

Public Members

size_t nr_opr = 0

number of oprs written

uint64_t content_hash

hash of the graph

size_t tot_bytes = 0

full dump size and param value size

size_t tensor_value_bytes = 0
std::vector<std::string> inputs

input tensor names

std::vector<std::string> outputs

output var names

std::vector<std::string> params

dumped param names