diff --git a/paddle/fluid/inference/analysis/passes/ir_params_sync_among_devices_pass.cc b/paddle/fluid/inference/analysis/passes/ir_params_sync_among_devices_pass.cc index e3241d78e6bd2a6c128559436bc788767b2a059b..f325f2dec6510bb339e23f8617ff8ce40c6578e8 100644 --- a/paddle/fluid/inference/analysis/passes/ir_params_sync_among_devices_pass.cc +++ b/paddle/fluid/inference/analysis/passes/ir_params_sync_among_devices_pass.cc @@ -232,6 +232,7 @@ void IrParamsSyncAmongDevicesPass::RunImpl(Argument *argument) { CopyParamsToCustomDevice(argument); } #endif + paddle::memory::Release(platform::CPUPlace()); } std::string IrParamsSyncAmongDevicesPass::repr() const {