1/* Copyright 2016 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_DEBUG_DEBUGGER_STATE_IMPL_H_
17#define TENSORFLOW_CORE_DEBUG_DEBUGGER_STATE_IMPL_H_
18
19#include "tensorflow/core/common_runtime/debugger_state_interface.h"
20
21#include <unordered_set>
22#include <vector>
23
24namespace tensorflow {
25
26class DebuggerState : public DebuggerStateInterface {
27 public:
28 DebuggerState(const DebugOptions& debug_options);
29 virtual ~DebuggerState();
30
31 // Publish metadata about the debugged Session::Run() call.
32 //
33 // See the doc string of DebuggerStateInterface::PublishDebugMetadata() for
34 // details.
35 Status PublishDebugMetadata(const int64_t global_step,
36 const int64_t session_run_count,
37 const int64_t executor_step_count,
38 const std::vector<string>& input_names,
39 const std::vector<string>& output_names,
40 const std::vector<string>& target_names) override;
41
42 private:
43 std::unordered_set<string> debug_urls_;
44};
45
46class DebugGraphDecorator : public DebugGraphDecoratorInterface {
47 public:
48 DebugGraphDecorator(const DebugOptions& debug_options)
49 : debug_options_(debug_options) {}
50 virtual ~DebugGraphDecorator() {}
51
52 Status DecorateGraph(Graph* graph, Device* device) override;
53 Status PublishGraph(const Graph& graph, const string& device_name) override;
54
55 private:
56 DebugOptions debug_options_;
57};
58
59} // namespace tensorflow
60
61#endif // TENSORFLOW_CORE_DEBUG_DEBUGGER_STATE_IMPL_H_
62