未验证 提交 7edb0bf9 编写于 作者: R ronnywang 提交者: GitHub

[CustomDevice] fix bug in custom allocator (#56977)

上级 85dbcefd
...@@ -29,7 +29,8 @@ void CustomAllocator::FreeImpl(phi::Allocation* allocation) { ...@@ -29,7 +29,8 @@ void CustomAllocator::FreeImpl(phi::Allocation* allocation) {
platform::errors::PermissionDenied("CustomDevice memory is " platform::errors::PermissionDenied("CustomDevice memory is "
"freed in incorrect device. " "freed in incorrect device. "
"This may be a bug")); "This may be a bug"));
phi::DeviceManager::GetDeviceWithPlace(place_)->MemoryDeallocate(
allocation->ptr(), allocation->size());
delete allocation; delete allocation;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册