diff --git a/cmake/external/xpu.cmake b/cmake/external/xpu.cmake index cfbe68eecbaca55c5a288aae2c985bbc33d37be2..dbc629a3e3fd2f3b5d99bba78954cd00986310af 100644 --- a/cmake/external/xpu.cmake +++ b/cmake/external/xpu.cmake @@ -36,7 +36,7 @@ ENDIF() if(NOT DEFINED XPU_BASE_URL) SET(XPU_BASE_URL_WITHOUT_DATE "https://baidu-kunlun-product.cdn.bcebos.com/KL-SDK/klsdk-dev") - SET(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20220307") + SET(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20220324") else() SET(XPU_BASE_URL "${XPU_BASE_URL}") endif() diff --git a/paddle/fluid/memory/allocation/naive_best_fit_allocator.cc b/paddle/fluid/memory/allocation/naive_best_fit_allocator.cc index 0bfbe2c6962294fc7e4aa2fff079e9cf411f26f8..5efbfce7fedd600a4e679e5b10ee67454a569f4f 100644 --- a/paddle/fluid/memory/allocation/naive_best_fit_allocator.cc +++ b/paddle/fluid/memory/allocation/naive_best_fit_allocator.cc @@ -150,7 +150,7 @@ void *Alloc(const platform::XPUPlace &place, size_t size) { platform::XPUDeviceGuard gurad(place.device); int ret = xpu_malloc(reinterpret_cast(&p), size); if (ret != XPU_SUCCESS) { - std::cout << "xpu memory malloc(" << size << ") failed, try again\n"; + VLOG(10) << "xpu memory malloc(" << size << ") failed, try again"; xpu_wait(); ret = xpu_malloc(reinterpret_cast(&p), size); } diff --git a/python/paddle/fluid/tests/unittests/xpu/test_tril_triu_op_xpu.py b/python/paddle/fluid/tests/unittests/xpu/test_tril_triu_op_xpu.py index 785549abba8f3ad732dd49263532fcf453f0517b..fb6b28d9c282512caf3405d56a4321df9e2668dd 100644 --- a/python/paddle/fluid/tests/unittests/xpu/test_tril_triu_op_xpu.py +++ b/python/paddle/fluid/tests/unittests/xpu/test_tril_triu_op_xpu.py @@ -94,17 +94,27 @@ class XPUTestTrilTriuOp(XPUOpTestWrapper): class TestTrilTriuOp3(TestTrilTriuOp): def initTestCase(self): self.diagonal = 10 - self.Xshape = (25, 25) + self.Xshape = (2, 25, 25) class TestTrilTriuOp4(TestTrilTriuOp): def initTestCase(self): self.diagonal = -10 - self.Xshape = (33, 11) + self.Xshape = (1, 2, 33, 11) class TestTrilTriuOp5(TestTrilTriuOp): def initTestCase(self): self.diagonal = 11 - self.Xshape = (1, 99) + self.Xshape = (1, 1, 99) + + class TestTrilTriuOp6(TestTrilTriuOp): + def initTestCase(self): + self.diagonal = 5 + self.Xshape = (1, 2, 3, 5, 99) + + class TestTrilTriuOp7(TestTrilTriuOp): + def initTestCase(self): + self.diagonal = -100 + self.Xshape = (2, 2, 3, 4, 5) class TestTrilTriuOpError(unittest.TestCase):