MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / save_buffer

Function save_buffer

src/load_save.cpp:83–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83std::vector<char> save_buffer(const program& p, const file_options& options)
84{
85 value v = p.to_value();
86 print_miopen_warning(p);
87 std::vector<char> buffer;
88 if(options.format == "msgpack")
89 {
90 buffer = to_msgpack(v);
91 }
92 else if(options.format == "json")
93 {
94 std::string s = to_json_string(v);
95 buffer = std::vector<char>(s.begin(), s.end());
96 }
97 else
98 {
99 MIGRAPHX_THROW("Unknown format: " + options.format);
100 }
101 return buffer;
102}
103
104} // namespace MIGRAPHX_INLINE_NS
105} // namespace migraphx

Callers 4

TEST_CASEFunction · 0.85
saveFunction · 0.85
saveMethod · 0.85
MIGRAPHX_PYBIND11_MODULEFunction · 0.85

Calls 6

print_miopen_warningFunction · 0.85
to_msgpackFunction · 0.85
to_json_stringFunction · 0.85
to_valueMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected