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

Function RunFileCheck

tensorflow/compiler/xla/tests/filecheck.cc:31–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29namespace xla {
30
31StatusOr<bool> RunFileCheck(const std::string& input,
32 absl::string_view pattern) {
33 // Generate an input file for the FileCheck pattern.
34 std::string pattern_path;
35 auto env = tensorflow::Env::Default();
36 if (!env->LocalTempFilename(&pattern_path)) {
37 return tensorflow::errors::Internal("couldn't get a pattern file name");
38 }
39 TF_RETURN_IF_ERROR(tensorflow::WriteStringToFile(env, pattern_path, pattern));
40
41 return RunFileCheckWithPatternFile(input, pattern_path);
42}
43
44StatusOr<bool> RunFileCheckWithPatternFile(const std::string& input,
45 const std::string& pattern_file) {

Callers 5

TESTFunction · 0.85
CompileAndVerifyIrMethod · 0.85
MatchOptimizedHloMethod · 0.85

Calls 5

DefaultFunction · 0.85
InternalFunction · 0.85
WriteStringToFileFunction · 0.85
LocalTempFilenameMethod · 0.80

Tested by

no test coverage detected