Summary:
Changelog:
- Fix formatting for error messages in prelu, EmbeddingBag, RNN
Fixes https://github.com/pytorch/pytorch/issues/16043
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16067
Differential Revision:
D13693286
Pulled By: soumith
fbshipit-source-id:
b0760d13c9a45e82dababfc44dabe648e5345ca3
input_stride1 = strides[1];
}
AT_CHECK(channel_size == weight_num,
- "Mismatch of parameter numbers and input channel size. Found parameter numbers = %d, and channel size = %d.",
- weight_num, channel_size);
+ "Mismatch of parameter numbers and input channel size. Found parameter numbers = ", weight_num,
+ " and channel size = ", channel_size, ".");
AT_DISPATCH_FLOATING_TYPES(input.type(), "prelu_cpu", [&] {
prelu_cpu_kernel_multi_weights<scalar_t>(
input_stride1 = strides[1];
}
AT_CHECK(channel_size == weight_num,
- "Mismatch of parameter numbers and input channel size. Found parameter numbers = %d, and channel size = %d.",
- weight_num, channel_size);
+ "Mismatch of parameter numbers and input channel size. Found parameter numbers = ", weight_num,
+ " and channel size = ", channel_size, ".");
AT_DISPATCH_FLOATING_TYPES(input.type(), "prelu_backward_cpu", [&] {
prelu_cpu_backward_kernel_multi_weights<scalar_t>(
input_stride1 = strides[1];
}
AT_CHECK(channel_size == weight_num,
- "Mismatch of parameter numbers and input channel size. Found parameter numbers = %d, and channel size = %d.",
- weight_num, channel_size);
+ "Mismatch of parameter numbers and input channel size. Found parameter numbers = ", weight_num,
+ " and channel size = ", channel_size, ".");
// config to run cuda kernel
int64_t input_numel = input.numel();
input_stride1 = strides[1];
}
AT_CHECK(channel_size == weight_num,
- "Mismatch of parameter numbers and input channel size. Found parameter numbers = %d, and channel size = %d.",
- weight_num, channel_size);
+ "Mismatch of parameter numbers and input channel size. Found parameter numbers = ", weight_num,
+ " and channel size = ", channel_size, ".");
// config to run cuda kernel
int64_t input_numel = input.numel();
default:
AT_ERROR(
- "Unknown mode for embedding_bag_backward_cuda %d", mode);
+ "Unknown mode for embedding_bag_backward_cuda ", mode);
}
}
case CUDNN_RNN_TANH:
return 2;
default:
- AT_ERROR("unknown cuDNN RNN mode %d", mode);
+ AT_ERROR("unknown cuDNN RNN mode ", mode);
}
}