Clarify CPU/GPU infeed error messages.

PiperOrigin-RevId: 312254085
Change-Id: Ic981d72bf59e41b149cf0036a272250d4ea482a3
This commit is contained in:
A. Unique TensorFlower 2020-05-19 04:23:07 -07:00 committed by TensorFlower Gardener
parent 686908251a
commit 8121e42ca4
2 changed files with 4 additions and 2 deletions

View File

@ -154,7 +154,8 @@ CpuTransferManager::TransferBufferToInfeedInternal(se::StreamExecutor* executor,
int64 size,
const void* source) {
if (size > std::numeric_limits<int32>::max()) {
return InvalidArgument("Infeed shape is too large: needs %d bytes", size);
return InvalidArgument("CPU infeed of %d bytes exceeds maximum of %d bytes",
size, std::numeric_limits<int32>::max());
}
if (size <= 0) {

View File

@ -96,7 +96,8 @@ Status GpuTransferManager::EnqueueBuffersToInfeed(
StatusOr<InfeedBuffer> GpuTransferManager::TransferBufferToInfeedInternal(
se::StreamExecutor* executor, int64 size, const void* source) {
if (size > std::numeric_limits<int32>::max()) {
return InvalidArgument("Infeed shape is too large: needs %d bytes", size);
return InvalidArgument("GPU infeed of %d bytes exceeds maximum of %d bytes",
size, std::numeric_limits<int32>::max());
}
if (size == 0) {