未验证 提交 2261390c 编写于 作者: R Ruibiao Chen 提交者: GitHub

Set waiterType of kGpuSync to kCUDA (#50241)

上级 be83e1ee
......@@ -431,8 +431,7 @@ void StreamAnalyzer::ShrinkEventInfo(
platform::DeviceType StreamAnalyzer::GetWaiterType(
const Instruction& instr) const {
if (instr.KernelType() == OpFuncType::kCpuSync ||
instr.KernelType() == OpFuncType::kGpuSync) {
if (instr.KernelType() == OpFuncType::kCpuSync) {
return platform::kCPU;
} else {
if (platform::is_xpu_place(place_)) {
......
......@@ -858,8 +858,6 @@ void InterpreterCore::RunOperator(const Instruction& instr_node) {
: var_scope_.GetMutableScope();
VLOG(4) << "Start run " << place << " " << op->DebugStringEx(local_scope);
SetDeviceId(place);
#ifdef PADDLE_WITH_ASCEND_CL
if (platform::is_npu_place(place)) {
// NOTE(wangxi): nan/inf cannot be detected on NPU by checking the
......@@ -989,6 +987,8 @@ void InterpreterCore::RunInstruction(const Instruction& instr_node) {
platform::RecordEvent instruction_event(
op->Type(), platform::TracerEventType::Operator, 1);
SetDeviceId(instr_node.DeviceContext().GetPlace());
try {
instr_node.WaitEvent(place_);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册