未验证 提交 5bbbf5dd 编写于 作者: Y ykkk2333 提交者: GitHub

fix xpu retry allocator bug (#54847)

上级 158b7ae5
......@@ -98,7 +98,7 @@ phi::backends::xpu::XPUVersion get_xpu_version(int dev_id) {
size_t XPUMinChunkSize() { return 1 << 6; }
static void RaiseNonOutOfMemoryError(int status) {
if (status == XPUERR_NOMEM) {
if (-1 * status == XPUERR_NOMEM) {
status = XPU_SUCCESS;
}
PADDLE_ENFORCE_XRE_SUCCESS(status);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册