Clarify CPU/GPU infeed error messages.
PiperOrigin-RevId: 312254085 Change-Id: Ic981d72bf59e41b149cf0036a272250d4ea482a3
This commit is contained in:
parent
686908251a
commit
8121e42ca4
@ -154,7 +154,8 @@ CpuTransferManager::TransferBufferToInfeedInternal(se::StreamExecutor* executor,
|
|||||||
int64 size,
|
int64 size,
|
||||||
const void* source) {
|
const void* source) {
|
||||||
if (size > std::numeric_limits<int32>::max()) {
|
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) {
|
if (size <= 0) {
|
||||||
|
@ -96,7 +96,8 @@ Status GpuTransferManager::EnqueueBuffersToInfeed(
|
|||||||
StatusOr<InfeedBuffer> GpuTransferManager::TransferBufferToInfeedInternal(
|
StatusOr<InfeedBuffer> GpuTransferManager::TransferBufferToInfeedInternal(
|
||||||
se::StreamExecutor* executor, int64 size, const void* source) {
|
se::StreamExecutor* executor, int64 size, const void* source) {
|
||||||
if (size > std::numeric_limits<int32>::max()) {
|
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) {
|
if (size == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user