1 /* Copyright 2017 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 16 #ifndef TENSORFLOW_COMPILER_AOT_FLAGS_H_ 17 #define TENSORFLOW_COMPILER_AOT_FLAGS_H_ 18 19 #include <string> 20 #include <vector> 21 22 #include "tensorflow/core/util/command_line_flags.h" 23 24 namespace tensorflow { 25 namespace tfcompile { 26 27 // Flags for the tfcompile binary. See *.cc file for descriptions. 28 29 struct MainFlags { 30 string graph; 31 string config; 32 bool dump_fetch_nodes = false; 33 string target_triple; 34 string target_cpu; 35 string target_features; 36 string entry_point; 37 string cpp_class; 38 string out_function_object; 39 string out_metadata_object; 40 string out_header; 41 string out_session_module; 42 string mlir_components; 43 44 // C++ codegen options 45 bool gen_name_to_index = false; 46 bool gen_program_shape = false; 47 }; 48 49 // Appends to flag_list a tensorflow::Flag for each field in MainFlags. 50 void AppendMainFlags(std::vector<Flag>* flag_list, MainFlags* flags); 51 52 } // namespace tfcompile 53 } // namespace tensorflow 54 55 #endif // TENSORFLOW_COMPILER_AOT_FLAGS_H_ 56