1/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations 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
21namespace tensorflow {
22namespace flags {
23
24class 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(enable_quantized_dtypes_training, false,
36 "Set quantized dtypes, like tf.qint8, to be trainable.");
37 TF_DECLARE_FLAG(graph_building_optimization, false,
38 "Optimize graph building for faster tf.function tracing.");
39 TF_DECLARE_FLAG(
40 op_building_optimization, true,
41 "Optimize tf.Operation building for faster tf.function tracing.");
42 TF_DECLARE_FLAG(saved_model_fingerprinting, false,
43 "Add fingerprint to SavedModels.");
44 // LINT.ThenChange(//tensorflow/core/config/flags_api_wrapper.cc)
45};
46
47Flags& Global();
48
49} // namespace flags
50} // namespace tensorflow
51
52#endif // TENSORFLOW_CORE_CONFIG_FLAG_DEFS_H_
53