Home | History | Annotate | Download | only in legacy_flags
      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_JIT_LEGACY_FLAGS_ENCAPSULATE_SUBGRAPHS_PASS_FLAGS_H_
     17 #define TENSORFLOW_COMPILER_JIT_LEGACY_FLAGS_ENCAPSULATE_SUBGRAPHS_PASS_FLAGS_H_
     18 
     19 // Legacy flags for the XLA bridge's encapsulate_subgraphs_pass module.
     20 
     21 #include <vector>
     22 
     23 #include "tensorflow/core/platform/types.h"
     24 #include "tensorflow/core/util/command_line_flags.h"
     25 
     26 namespace tensorflow {
     27 namespace legacy_flags {
     28 
     29 // Append to *flag_list flag definitions associated with the XLA bridge's
     30 // encapsulate_subgraphs_pass module.
     31 void AppendEncapsulateSubgraphsPassFlags(
     32     std::vector<tensorflow::Flag>* flag_list);
     33 
     34 // The values of flags associated with the XLA bridge's
     35 // encapsulate_subgraphs_pass module.
     36 typedef struct {
     37   bool tf_xla_parallel_checking;  // Debug tool. Runs both JIT-compiled and
     38                                   // interpreted graphs in parallel and verifies
     39                                   // they produce the same outputs.
     40 } EncapsulateSubgraphsPassFlags;
     41 
     42 // Return a pointer to the EncapsulateSubgraphsPassFlags struct;
     43 // repeated calls return the same pointer.
     44 // This should be called only after Flags::Parse() has returned.
     45 EncapsulateSubgraphsPassFlags* GetEncapsulateSubgraphsPassFlags();
     46 
     47 }  // namespace legacy_flags
     48 }  // namespace tensorflow
     49 
     50 #endif  // TENSORFLOW_COMPILER_JIT_LEGACY_FLAGS_ENCAPSULATE_SUBGRAPHS_PASS_FLAGS_H_
     51