Internal change

PiperOrigin-RevId: 306921449
Change-Id: I4e2c6f31d38dcb821ace207c12a17232813e9fa5
This commit is contained in:
A. Unique TensorFlower 2020-04-16 14:27:08 -07:00 committed by TensorFlower Gardener
parent 1e5d6adc00
commit 339eab07e8
7 changed files with 13 additions and 15 deletions

View File

@ -19,7 +19,7 @@ limitations under the License.
namespace tensorflow {
namespace functor {
DEFINE_BINARY5(maximum, Eigen::half, float, double, int16, int64);
DEFINE_BINARY4(maximum, Eigen::half, float, double, int64);
} // namespace functor
} // namespace tensorflow

View File

@ -19,7 +19,7 @@ limitations under the License.
namespace tensorflow {
namespace functor {
DEFINE_BINARY5(minimum, Eigen::half, float, double, int16, int64);
DEFINE_BINARY4(minimum, Eigen::half, float, double, int64);
} // namespace functor
} // namespace tensorflow

View File

@ -16,11 +16,11 @@ limitations under the License.
#include "tensorflow/core/kernels/cwise_ops_common.h"
namespace tensorflow {
REGISTER7(BinaryOp, CPU, "Maximum", functor::maximum, float, Eigen::half,
bfloat16, double, int16, int32, int64);
REGISTER6(BinaryOp, CPU, "Maximum", functor::maximum, float, Eigen::half,
bfloat16, double, int32, int64);
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
REGISTER5(BinaryOp, GPU, "Maximum", functor::maximum, float, Eigen::half,
double, int16, int64);
REGISTER4(BinaryOp, GPU, "Maximum", functor::maximum, float, Eigen::half,
double, int64);
// A special GPU kernel for int32.
// TODO(b/25387198): Also enable int32 in device memory. This kernel

View File

@ -16,11 +16,11 @@ limitations under the License.
#include "tensorflow/core/kernels/cwise_ops_common.h"
namespace tensorflow {
REGISTER7(BinaryOp, CPU, "Minimum", functor::minimum, float, Eigen::half,
bfloat16, double, int16, int32, int64);
REGISTER6(BinaryOp, CPU, "Minimum", functor::minimum, float, Eigen::half,
bfloat16, double, int32, int64);
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
REGISTER5(BinaryOp, GPU, "Minimum", functor::minimum, float, Eigen::half,
double, int16, int64);
REGISTER4(BinaryOp, GPU, "Minimum", functor::minimum, float, Eigen::half,
double, int64);
// A special GPU kernel for int32.
// TODO(b/25387198): Also enable int32 in device memory. This kernel

View File

@ -549,7 +549,7 @@ REGISTER_OP("Maximum")
.Input("x: T")
.Input("y: T")
.Output("z: T")
.Attr("T: {bfloat16, half, float, double, int16, int32, int64}")
.Attr("T: {bfloat16, half, float, double, int32, int64}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
// Note: This op is not commutative w.r.t. to all its inputs.
@ -573,7 +573,7 @@ REGISTER_OP("Minimum")
.Input("x: T")
.Input("y: T")
.Output("z: T")
.Attr("T: {bfloat16, half, float, double, int16, int32, int64}")
.Attr("T: {bfloat16, half, float, double, int32, int64}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
REGISTER_OP("Mod")

View File

@ -23709,7 +23709,6 @@ op {
type: DT_HALF
type: DT_FLOAT
type: DT_DOUBLE
type: DT_INT16
type: DT_INT32
type: DT_INT64
}
@ -23965,7 +23964,6 @@ op {
type: DT_HALF
type: DT_FLOAT
type: DT_DOUBLE
type: DT_INT16
type: DT_INT32
type: DT_INT64
}

View File

@ -733,7 +733,7 @@ class MinMaxOpTest(test.TestCase):
def testBasic(self):
x = np.random.rand(1, 3, 2) * 100.
y = np.random.rand(1, 3, 2) * 100.
for t in [np.float16, np.float32, np.float64, np.int16, np.int32, np.int64]:
for t in [np.float16, np.float32, np.float64, np.int32, np.int64]:
self._compare(x.astype(t), y.astype(t), use_gpu=False)
self._compare(x.astype(t), y.astype(t), use_gpu=True)