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 debug_info; |
32 | string debug_info_path_begin_marker; |
33 | string config; |
34 | bool dump_fetch_nodes = false; |
35 | string target_triple; |
36 | string target_cpu; |
37 | string target_features; |
38 | string entry_point; |
39 | string cpp_class; |
40 | string out_function_object; |
41 | string out_metadata_object; |
42 | string out_header; |
43 | string out_session_module; |
44 | string mlir_components; |
45 | bool experimental_quantize = false; |
46 | |
47 | // Sanitizer pass options |
48 | bool sanitize_dataflow = false; |
49 | string sanitize_abilists_dataflow; |
50 | |
51 | // C++ codegen options |
52 | bool gen_name_to_index = false; |
53 | bool gen_program_shape = false; |
54 | }; |
55 | |
56 | // Appends to flag_list a tensorflow::Flag for each field in MainFlags. |
57 | void AppendMainFlags(std::vector<Flag>* flag_list, MainFlags* flags); |
58 | |
59 | } // namespace tfcompile |
60 | } // namespace tensorflow |
61 | |
62 | #endif // TENSORFLOW_COMPILER_AOT_FLAGS_H_ |
63 | |