common_subgraph_elimination.cc
imports tensorflow/core/platform/errors.himports tensorflow/core/platform/hash.h
SHA-256ed102575277f0daeb85f67ded0da15e04f705656a6d9f598e64469bcfba2bf9e
MaleculeMd(In₆)
Evidence
1/* Copyright 2020 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 …
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include "tensorflow/core/grappler/optimizers/common_subgraph_elimination.h"
17
18#include <set>
19#include <string>
20#include <unordered_set>
21#include <utility>
22#include <vector>
23
24#include "absl/container/flat_hash_map.h"
25#include "absl/container/flat_hash_set.h"
26#include "tensorflow/core/framework/attr_value_util.h"
27#include "tensorflow/core/framework/graph.pb.h"
28#include "tensorflow/core/framework/node_def.pb.h"
29#include "tensorflow/core/graph/tensor_id.h"
30#include "tensorflow/core/grappler/graph_topology_view.h"
31#include "tensorflow/core/grappler/grappler_item.h"
32#include "tensorflow/core/grappler/op_types.h"
33#include "tensorflow/core/grappler/optimizers/graph_optimizer.h"
34#include "tensorflow/core/grappler/utils.h"
35#include "tensorflow/core/grappler/utils/canonicalizer.h"
36#include "tensorflow/core/grappler/utils/topological_sort.h"
37#include "tensorflow/core/grappler/utils/traversal.h"
38#include "tensorflow/core/lib/gtl/flatset.h"
39#include "tensorflow/core/platform/errors.h"
40#include "tensorflow/core/platform/hash.h"
41#include "tensorflow/core/platform/status.h"
42#include "tensorflow/core/platform/strcat.h"
43#include "tensorflow/core/platform/stringpiece.h"
44#include "tensorflow/core/platform/types.h"
45
46namespace tensorflow {
⋯6 lines
60:29… s if the node has large attribute tensor values that
61 // have different proto encoding but identical tensor value.
62 NodeDef* FindOrAddRepresentative(NodeDef …