diff options
author | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
---|---|---|
committer | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
commit | f41959ccb2d9d4c722fe8fc3351401d53bcf4900 (patch) | |
tree | ef0ca22cb2a5ac4bdec9d080d8e0788a53ed496d /tensorflow/python/framework/python_op_gen_main.cc |
TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation
using data flow graphs.
Base CL: 107276108
Diffstat (limited to 'tensorflow/python/framework/python_op_gen_main.cc')
-rw-r--r-- | tensorflow/python/framework/python_op_gen_main.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tensorflow/python/framework/python_op_gen_main.cc b/tensorflow/python/framework/python_op_gen_main.cc new file mode 100644 index 0000000000..29afe35598 --- /dev/null +++ b/tensorflow/python/framework/python_op_gen_main.cc @@ -0,0 +1,30 @@ +#include "tensorflow/python/framework/python_op_gen.h" + +#include "tensorflow/core/framework/op.h" +#include "tensorflow/core/framework/op_def.pb.h" +#include "tensorflow/core/platform/init_main.h" +#include "tensorflow/core/platform/logging.h" + +namespace tensorflow { +namespace { + +void PrintAllPythonOps(const char* hidden, bool require_shapes) { + OpList ops; + OpRegistry::Global()->Export(false, &ops); + PrintPythonOps(ops, hidden, require_shapes); +} + +} // namespace +} // namespace tensorflow + +int main(int argc, char* argv[]) { + tensorflow::port::InitMain(argv[0], &argc, &argv); + if (argc == 2) { + tensorflow::PrintAllPythonOps("", std::string(argv[1]) == "1"); + } else if (argc == 3) { + tensorflow::PrintAllPythonOps(argv[1], std::string(argv[2]) == "1"); + } else { + return -1; + } + return 0; +} |