• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 struct MainFlags {
29   string graph;
30   string config;
31   bool dump_fetch_nodes = false;
32   string target_triple;
33   string target_cpu;
34   string target_features;
35   string entry_point;
36   string cpp_class;
37   string out_function_object;
38   string out_metadata_object;
39   string out_header;
40   string out_session_module;
41 
42   // C++ codegen options
43   bool gen_name_to_index = false;
44   bool gen_program_shape = false;
45 };
46 
47 // Appends to flag_list a tensorflow::Flag for each field in MainFlags.
48 void AppendMainFlags(std::vector<Flag>* flag_list, MainFlags* flags);
49 
50 }  // namespace tfcompile
51 }  // namespace tensorflow
52 
53 #endif  // TENSORFLOW_COMPILER_AOT_FLAGS_H_
54