Remove unnecessary format literals from error message.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20646
Differential Revision: D15394795
fbshipit-source-id: 8033cf03341244b2b6a119e3c59f48ee6fe959cc
diff --git a/c10/cuda/CUDACachingAllocator.cpp b/c10/cuda/CUDACachingAllocator.cpp
index f03ba43..aec0605 100644
--- a/c10/cuda/CUDACachingAllocator.cpp
+++ b/c10/cuda/CUDACachingAllocator.cpp
@@ -338,7 +338,7 @@
std::lock_guard<std::recursive_mutex> lock(mutex);
Block* block = find_allocated_block(ptr);
if (!block) {
- AT_ERROR("invalid device pointer: %p", ptr);
+ AT_ERROR("invalid device pointer: ", ptr);
}
while (block->prev) {
block = block->prev;
@@ -381,7 +381,7 @@
std::lock_guard<std::recursive_mutex> lock(mutex);
Block* block = find_allocated_block(ptr);
if (!block) {
- AT_ERROR("invalid device pointer: %p", ptr);
+ AT_ERROR("invalid device pointer: ", ptr);
}
if (stream.stream() == block->stream) {
// ignore uses on the allocation stream, since those don't require any