diff options
Diffstat (limited to 'tensorflow/core/graph/testlib.cc')
-rw-r--r-- | tensorflow/core/graph/testlib.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tensorflow/core/graph/testlib.cc b/tensorflow/core/graph/testlib.cc index 67b252cb6c..ea7788f654 100644 --- a/tensorflow/core/graph/testlib.cc +++ b/tensorflow/core/graph/testlib.cc @@ -21,39 +21,14 @@ limitations under the License. #include "tensorflow/core/framework/node_def_builder.h" #include "tensorflow/core/framework/node_def_util.h" #include "tensorflow/core/framework/op.h" -#include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/types.h" #include "tensorflow/core/framework/types.pb.h" #include "tensorflow/core/graph/graph.h" #include "tensorflow/core/graph/node_builder.h" -#include "tensorflow/core/kernels/constant_op.h" #include "tensorflow/core/lib/core/status.h" #include "tensorflow/core/platform/logging.h" namespace tensorflow { - -// HostConst: forced to generate output on the host. -// Only used by testlib; no op is registered for this kernel -// externally (i.e., in array_ops.cc) -REGISTER_KERNEL_BUILDER(Name("HostConst").Device(DEVICE_CPU), HostConstantOp); -REGISTER_KERNEL_BUILDER( - Name("HostConst").Device(DEVICE_GPU).HostMemory("output"), HostConstantOp); -#ifdef TENSORFLOW_USE_SYCL -REGISTER_KERNEL_BUILDER( - Name("HostConst").Device(DEVICE_SYCL).HostMemory("output"), HostConstantOp); -#endif // TENSORFLOW_USE_SYCL - -// Register the HostConst Op -// Returns a constant tensor on the host. Useful for writing C++ tests -// and benchmarks which run on GPU but require arguments pinned to the host. -// Used by test::graph::HostConstant. -// value: Attr `value` is the tensor to return. -REGISTER_OP("HostConst") - .Output("output: dtype") - .Attr("value: tensor") - .Attr("dtype: type") - .SetShapeFn(shape_inference::UnknownShape); - namespace test { namespace graph { |