From 502062da65fa940ff483870b02faeeace3e224a4 Mon Sep 17 00:00:00 2001 From: houj04 <35131887+houj04@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:37:38 +0800 Subject: [PATCH] minor fix VLOG for xpu. test=kunlun. (#44099) --- paddle/fluid/memory/allocation/naive_best_fit_allocator.cc | 2 +- paddle/phi/backends/xpu/xpu_context.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/memory/allocation/naive_best_fit_allocator.cc b/paddle/fluid/memory/allocation/naive_best_fit_allocator.cc index 57c5941d522..4553c80e74c 100644 --- a/paddle/fluid/memory/allocation/naive_best_fit_allocator.cc +++ b/paddle/fluid/memory/allocation/naive_best_fit_allocator.cc @@ -180,7 +180,7 @@ void Free(const platform::XPUPlace &place, void *p, size_t size) { #ifdef PADDLE_WITH_XPU - VLOG(10) << "Allocate " << size << " bytes on " << platform::Place(place); + VLOG(10) << "Free " << size << " bytes on " << platform::Place(place); VLOG(10) << "Free pointer=" << p << " on " << platform::Place(place); platform::XPUDeviceGuard gurad(place.device); diff --git a/paddle/phi/backends/xpu/xpu_context.cc b/paddle/phi/backends/xpu/xpu_context.cc index dbff88c0a27..e73aa30c8d8 100644 --- a/paddle/phi/backends/xpu/xpu_context.cc +++ b/paddle/phi/backends/xpu/xpu_context.cc @@ -45,8 +45,8 @@ struct XPUContext::Impl { } if (l3ptrs[place_.GetDeviceId()] != nullptr) { context_->_l3_mgr.set(l3ptrs[place_.GetDeviceId()], l3_size); - VLOG(3) << "xpu place " << place_.GetDeviceId() << " set l3 size " - << l3_size; + VLOG(3) << "xpu place " << static_cast(place_.GetDeviceId()) + << " set l3 size " << l3_size; } break; } -- GitLab