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

Function GenerateCcOpFiles

tensorflow/cc/framework/cc_op_gen_test.cc:86–101  ·  view source on GitHub ↗

Runs WriteCCOps and stores output in (internal_)cc_file_path and (internal_)h_file_path.

Source from the content-addressed store, hash-verified

84// Runs WriteCCOps and stores output in (internal_)cc_file_path and
85// (internal_)h_file_path.
86void GenerateCcOpFiles(Env* env, const OpList& ops,
87 const ApiDefMap& api_def_map, string* h_file_text,
88 string* internal_h_file_text) {
89 const string& tmpdir = testing::TmpDir();
90
91 const auto h_file_path = io::JoinPath(tmpdir, "test.h");
92 const auto cc_file_path = io::JoinPath(tmpdir, "test.cc");
93 const auto internal_h_file_path = io::JoinPath(tmpdir, "test_internal.h");
94 const auto internal_cc_file_path = io::JoinPath(tmpdir, "test_internal.cc");
95
96 WriteCCOps(ops, api_def_map, h_file_path, cc_file_path);
97
98 TF_ASSERT_OK(ReadFileToString(env, h_file_path, h_file_text));
99 TF_ASSERT_OK(
100 ReadFileToString(env, internal_h_file_path, internal_h_file_text));
101}
102
103TEST(CcOpGenTest, TestVisibilityChangedToHidden) {
104 const string api_def = R"(

Callers 1

TESTFunction · 0.85

Calls 4

TmpDirFunction · 0.85
WriteCCOpsFunction · 0.85
ReadFileToStringFunction · 0.85
JoinPathFunction · 0.50

Tested by

no test coverage detected