1/* Copyright 2015-2017 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// See docs in ../ops/array_ops.cc.
17#include "tensorflow/core/kernels/identity_n_op.h"
18
19#include "tensorflow/core/common_runtime/input_colocation_exemption_registry.h"
20#include "tensorflow/core/framework/op_kernel.h"
21#include "tensorflow/core/framework/register_types.h"
22#include "tensorflow/core/framework/tensor.h"
23#include "tensorflow/core/framework/types.h"
24
25namespace tensorflow {
26
27REGISTER_KERNEL_BUILDER(Name("IdentityN").Device(DEVICE_DEFAULT), IdentityNOp);
28REGISTER_KERNEL_BUILDER(Name("IdentityN").Device(DEVICE_TPU_SYSTEM),
29 IdentityNOp);
30
31// Do not worry about colocating IdentityN op with its resource inputs since
32// it just forwards it's inputs anyway. This is needed because we create
33// IdentityN nodes to club "all" outputs of functional ops while lowering to
34// make the original functional op fetchable.
35REGISTER_INPUT_COLOCATION_EXEMPTION("IdentityN");
36
37} // namespace tensorflow
38