• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2022 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_CORE_CONFIG_FLAG_DEFS_H_
17 #define TENSORFLOW_CORE_CONFIG_FLAG_DEFS_H_
18 
19 #include "tensorflow/core/config/flags.h"
20 
21 namespace tensorflow {
22 namespace flags {
23 
24 class Flags {
25  public:
26   // Test only flags. See flags_test.cc for example usage.
27   TF_DECLARE_FLAG(test_only_experiment_1, true, "Test only experiment 1.");
28   TF_DECLARE_FLAG(test_only_experiment_2, false, "Test only experiment 2.");
29 
30   // Declare flags below here.
31   // LINT.IfChange
32   TF_DECLARE_FLAG(enable_nested_function_shape_inference, false,
33                   "Allow ops such as tf.cond to invoke the ShapeRefiner on "
34                   "their nested functions.");
35   TF_DECLARE_FLAG(graph_building_optimization, false,
36                   "Optimize graph building for faster tf.function tracing.");
37   TF_DECLARE_FLAG(
38       op_building_optimization, true,
39       "Optimize tf.Operation building for faster tf.function tracing.");
40   TF_DECLARE_FLAG(saved_model_fingerprinting, false,
41                   "Add fingerprint to SavedModels.");
42   // LINT.ThenChange(//tensorflow/core/config/flags_api_wrapper.cc)
43 };
44 
45 Flags& Global();
46 
47 }  // namespace flags
48 }  // namespace tensorflow
49 
50 #endif  // TENSORFLOW_CORE_CONFIG_FLAG_DEFS_H_
51