MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ReadPath

Method ReadPath

tensorflow/compiler/xla/text_literal_reader.cc:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41namespace xla {
42
43StatusOr<Literal> TextLiteralReader::ReadPath(absl::string_view path) {
44 CHECK(!absl::EndsWith(path, ".gz"))
45 << "TextLiteralReader no longer supports reading .gz files";
46 std::unique_ptr<tensorflow::RandomAccessFile> file;
47 Status s =
48 tensorflow::Env::Default()->NewRandomAccessFile(std::string(path), &file);
49 if (!s.ok()) {
50 return s;
51 }
52
53 TextLiteralReader reader(file.release());
54 return reader.ReadAllLines();
55}
56
57TextLiteralReader::TextLiteralReader(tensorflow::RandomAccessFile* file)
58 : file_(file) {}

Callers

nothing calls this directly

Calls 6

EndsWithFunction · 0.85
DefaultFunction · 0.85
ReadAllLinesMethod · 0.80
NewRandomAccessFileMethod · 0.45
okMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected