From d90469a4a43baa54e53dc90238140919e032ba83 Mon Sep 17 00:00:00 2001 From: houj04 <35131887+houj04@users.noreply.github.com> Date: Fri, 25 Nov 2022 09:21:24 +0800 Subject: [PATCH] fix xpu compile on phi::enforce. (#48345) --- paddle/fluid/platform/device/xpu/tests/enforce_xpu_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/platform/device/xpu/tests/enforce_xpu_test.cc b/paddle/fluid/platform/device/xpu/tests/enforce_xpu_test.cc index b2fd80530fe..afa02f62c32 100644 --- a/paddle/fluid/platform/device/xpu/tests/enforce_xpu_test.cc +++ b/paddle/fluid/platform/device/xpu/tests/enforce_xpu_test.cc @@ -27,7 +27,7 @@ bool CheckXPUStatusFailure(T value, const std::string& msg) { try { PADDLE_ENFORCE_XPU_SUCCESS(value); return false; - } catch (paddle::platform::EnforceNotMet& error) { + } catch (phi::enforce::EnforceNotMet& error) { std::string ex_msg = error.what(); std::cout << ex_msg << std::endl; return ex_msg.find(msg) != std::string::npos; @@ -45,7 +45,7 @@ bool CheckXDNNStatusFailure(T value, const std::string& msg) { try { PADDLE_ENFORCE_XDNN_SUCCESS(value, "XDNN Error "); return false; - } catch (paddle::platform::EnforceNotMet& error) { + } catch (phi::enforce::EnforceNotMet& error) { std::string ex_msg = error.what(); std::cout << ex_msg << std::endl; return ex_msg.find(msg) != std::string::npos; -- GitLab