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

Function main

tensorflow/python/framework/python_op_gen_main.cc:146–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144} // namespace tensorflow
145
146int main(int argc, char* argv[]) {
147 tensorflow::port::InitMain(argv[0], &argc, &argv);
148
149 tensorflow::string source_file_name =
150 tensorflow::InferSourceFileName(argv[0]);
151
152 // Usage:
153 // gen_main api_def_dir1,api_def_dir2,...
154 // [ @FILENAME | OpName[,OpName]* ] (0 | 1) [0 | 1]
155 if (argc < 3) {
156 return -1;
157 }
158 std::vector<tensorflow::string> api_def_dirs = tensorflow::str_util::Split(
159 argv[1], ",", tensorflow::str_util::SkipEmpty());
160
161 if (argc == 3) {
162 tensorflow::PrintAllPythonOps({}, api_def_dirs, source_file_name,
163 tensorflow::string(argv[2]) == "1",
164 false /* op_list_is_whitelist */);
165 } else if (argc == 4) {
166 std::vector<tensorflow::string> hidden_ops;
167 TF_CHECK_OK(tensorflow::ParseOpListCommandLine(argv[2], &hidden_ops));
168 tensorflow::PrintAllPythonOps(hidden_ops, api_def_dirs, source_file_name,
169 tensorflow::string(argv[3]) == "1",
170 false /* op_list_is_whitelist */);
171 } else if (argc == 5) {
172 std::vector<tensorflow::string> op_list;
173 TF_CHECK_OK(tensorflow::ParseOpListCommandLine(argv[2], &op_list));
174 tensorflow::PrintAllPythonOps(op_list, api_def_dirs, source_file_name,
175 tensorflow::string(argv[3]) == "1",
176 tensorflow::string(argv[4]) == "1");
177 } else {
178 return -1;
179 }
180 return 0;
181}

Callers

nothing calls this directly

Calls 6

InferSourceFileNameFunction · 0.85
SkipEmptyClass · 0.85
PrintAllPythonOpsFunction · 0.85
ParseOpListCommandLineFunction · 0.85
InitMainFunction · 0.50
SplitFunction · 0.50

Tested by

no test coverage detected