diff --git a/paddle/fluid/framework/new_executor/new_ir_interpreter.cc b/paddle/fluid/framework/new_executor/new_ir_interpreter.cc index 3b40a3b0727f16db2d90bad3d37e956782f4eea9..cde826f8c75bb3c10d157ec5a712de180b5698e8 100644 --- a/paddle/fluid/framework/new_executor/new_ir_interpreter.cc +++ b/paddle/fluid/framework/new_executor/new_ir_interpreter.cc @@ -1150,7 +1150,8 @@ void NewIRInterpreter::RecordStreamForGC(const Instruction& instr) { instr.KernelType() != OpFuncType::kGpuAsync) { return; } - if (instr.DeviceContext().GetPlace() == phi::CustomPlace()) { + if (instr.DeviceContext().GetPlace().GetType() == + phi::AllocationType::CUSTOM) { return; } platform::RecordEvent record( diff --git a/paddle/fluid/framework/new_executor/program_interpreter.cc b/paddle/fluid/framework/new_executor/program_interpreter.cc index b6c54192a6970eabaf2f3fe1d5644748a56f3500..3035dea85dcb4c6a9dea8d4522d90f2908c91492 100644 --- a/paddle/fluid/framework/new_executor/program_interpreter.cc +++ b/paddle/fluid/framework/new_executor/program_interpreter.cc @@ -1136,7 +1136,8 @@ void ProgramInterpreter::RecordStreamForGC(const Instruction& instr) { return; } - if (instr.DeviceContext().GetPlace() == phi::CustomPlace()) { + if (instr.DeviceContext().GetPlace().GetType() == + phi::AllocationType::CUSTOM) { return; }