From: Ashwin Bharambe Date: Thu, 6 Dec 2018 21:44:33 +0000 (-0800) Subject: Kill GPU memory logs in normal runs (#14838) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~2414 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f0bff96391621fcdad638a71e1ab6e42f553ef5;p=platform%2Fupstream%2Fpytorch.git Kill GPU memory logs in normal runs (#14838) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/14838 The GPU memory tracking logs are incredibly annoying and merely serve to pollute output. I `VLOG(1)`ed them. Hopefully, this is non-controversial. Reviewed By: kuttas Differential Revision: D13343290 fbshipit-source-id: b3cae99346c97b66e97ea660061e15dc5c99b9fc --- diff --git a/caffe2/core/context_gpu.cu b/caffe2/core/context_gpu.cu index 9893828..287e17e 100644 --- a/caffe2/core/context_gpu.cu +++ b/caffe2/core/context_gpu.cu @@ -384,14 +384,14 @@ void TrackMemoryAlloc(size_t nbytes) { long max_t = g_max_by_gpu_map[gpu]; if (max_t > 0) { if (max_t != t) { - LOG(INFO) << "GPU " << gpu << ": " << t / 1024 / 1024 << " MB" - << " (max: " << max_t / 1024 / 1024 << " MB)"; + VLOG(1) << "GPU " << gpu << ": " << t / 1024 / 1024 << " MB" + << " (max: " << max_t / 1024 / 1024 << " MB)"; } else { - LOG(INFO) << "GPU " << gpu << ": " << t / 1024 / 1024 << " MB"; + VLOG(1) << "GPU " << gpu << ": " << t / 1024 / 1024 << " MB"; } } } - LOG(INFO) << "Total: " << g_total_mem / 1024 / 1024 << " MB"; + VLOG(1) << "Total: " << g_total_mem / 1024 / 1024 << " MB"; g_last_rep = g_total_mem; } }