MCPcopy Create free account
hub / github.com/Samsung/ONE / parse

Function parse

compiler/tfinfo/src/TensorInfoParser.cpp:204–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202#undef CHECK_NOT_NULL
203
204std::vector<std::unique_ptr<ParsedTensor>> parse(const char *info_path)
205{
206 std::ifstream infile;
207 infile.open(info_path);
208
209 if (infile.fail())
210 {
211 throw oops::UserExn("Fail to open file", "path", info_path);
212 }
213
214 std::vector<std::unique_ptr<ParsedTensor>> tensors;
215
216 std::string line;
217 while (std::getline(infile, line))
218 {
219 auto tensor = parse_line(line);
220 if (tensor)
221 tensors.emplace_back(std::move(tensor));
222 }
223
224 return tensors;
225}
226
227} // namespace tftestinfo
228} // namespace support

Callers 6

operator()Method · 0.85
mainFunction · 0.85
operator()Method · 0.85
BackendMethod · 0.85
BackendMethod · 0.85
parseMethod · 0.85

Calls 4

UserExnClass · 0.85
parse_lineFunction · 0.70
failMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected