Skip to content

Commit

Permalink
Move sparse_reduce_sum_op.cc to sparse_reduce_op.cc
Browse files Browse the repository at this point in the history
This commit moves sparse_reduce_sum_op.cc to sparse_reduce_op.cc
so that both `sparse_reduce_sum` and `sparse_reduce_max` share
the same code base.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
  • Loading branch information
yongtang committed May 30, 2017
1 parent 56eff87 commit cdd89e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tensorflow/core/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2457,7 +2457,7 @@ tf_cc_tests(
":ops_util",
":sparse_add_op",
":sparse_dense_binary_op_shared",
":sparse_reduce_sum_op",
":sparse_reduce_op",
"//tensorflow/core:core_cpu",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
Expand Down Expand Up @@ -3185,7 +3185,7 @@ cc_library(
":sparse_cross_op",
":sparse_dense_binary_op_shared",
":sparse_fill_empty_rows_op",
":sparse_reduce_sum_op",
":sparse_reduce_op",
":sparse_reorder_op",
":sparse_reshape_op",
":sparse_softmax",
Expand Down Expand Up @@ -3241,8 +3241,8 @@ tf_kernel_library(
)

tf_kernel_library(
name = "sparse_reduce_sum_op",
prefix = "sparse_reduce_sum_op",
name = "sparse_reduce_op",
prefix = "sparse_reduce_op",
deps = SPARSE_DEPS,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ struct SumOp {
static void Run(OpKernelContext *ctx, typename TTypes<T>::Scalar &s, const typename TTypes<T>::UnalignedVec &v) {
s.device(ctx->eigen_cpu_device()) = v.sum();
}
static const char * Name() {
static StringPiece Name() {
return "sum";
}
};
Expand All @@ -144,7 +144,7 @@ struct MaxOp {
static void Run(OpKernelContext *ctx, typename TTypes<T>::Scalar &s, const typename TTypes<T>::UnalignedVec &v) {
s.device(ctx->eigen_cpu_device()) = v.maximum();
}
static const char * Name() {
static StringPiece Name() {
return "max";
}
};
Expand Down

0 comments on commit cdd89e2

Please sign in to comment.