Merge pull request #23103 from yongtang:17823-pad-uint8-gpu
PiperOrigin-RevId: 230738469
This commit is contained in:
commit
e45971094d
tensorflow
@ -322,6 +322,7 @@ namespace functor {
|
||||
|
||||
TF_CALL_GPU_ALL_TYPES(DECLARE_GPU_SPECS);
|
||||
TF_CALL_int8(DECLARE_GPU_SPECS);
|
||||
TF_CALL_uint8(DECLARE_GPU_SPECS);
|
||||
} // namespace functor
|
||||
|
||||
// Registration of the GPU implementations.
|
||||
@ -355,6 +356,7 @@ TF_CALL_int8(DECLARE_GPU_SPECS);
|
||||
|
||||
TF_CALL_GPU_ALL_TYPES(REGISTER_GPU_KERNEL);
|
||||
TF_CALL_int8(REGISTER_GPU_KERNEL);
|
||||
TF_CALL_uint8(REGISTER_GPU_KERNEL);
|
||||
|
||||
// A special GPU kernel for int32.
|
||||
// TODO(b/25387198): Also enable int32 in device memory. This kernel
|
||||
|
@ -41,6 +41,7 @@ typedef Eigen::GpuDevice GPUDevice;
|
||||
|
||||
TF_CALL_GPU_ALL_TYPES(DEFINE_GPU_SPECS);
|
||||
TF_CALL_int8(DEFINE_GPU_SPECS);
|
||||
TF_CALL_uint8(DEFINE_GPU_SPECS);
|
||||
|
||||
} // namespace tensorflow
|
||||
|
||||
|
@ -223,7 +223,7 @@ class PadOpTest(test.TestCase):
|
||||
def testIntTypes(self):
|
||||
# TODO(touts): Figure out why the padding tests do not work on GPU
|
||||
# for int types and rank > 2.
|
||||
for t in [np.int8, np.int32, np.int64]:
|
||||
for t in [np.int8, np.uint8, np.int32, np.int64]:
|
||||
self._testAll(
|
||||
np.random.randint(-100, 100, (4, 4, 3)).astype(t),
|
||||
[[1, 0], [2, 3], [0, 2]], 0)
|
||||
|
Loading…
Reference in New Issue
Block a user