1/* Copyright 2015 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#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_PROPAGATOR_DEBUG_UTILS_H_
16#define TENSORFLOW_CORE_COMMON_RUNTIME_PROPAGATOR_DEBUG_UTILS_H_
17
18namespace tensorflow {
19
20struct Entry;
21struct NodeItem;
22class Tensor;
23
24// Returns a pointer to the tensor in `input` if one exists, or `nullptr`.
25const Tensor* GetTensorValueForDump(const Entry& input);
26
27// Writes a LOG(WARNING) message describing the state of the given pending node
28// in the graph described by `immutable_state`.
29void DumpPendingNodeState(const NodeItem& node_item, const Entry* input_vector,
30 const bool show_nodes_with_no_ready_inputs);
31
32// Writes a LOG(WARNING) message describing the state of the given active node
33// in the graph described by `immutable_state`.
34void DumpActiveNodeState(const NodeItem& node_item, const Entry* input_vector);
35
36} // namespace tensorflow
37
38#endif // TENSORFLOW_CORE_COMMON_RUNTIME_PROPAGATOR_DEBUG_UTILS_H_
39