diff --git a/paddle/fluid/operators/controlflow/fetch_v2_op.cc b/paddle/fluid/operators/controlflow/fetch_v2_op.cc index 48065cc3fd1b8fbc43dfa3142ef130ff2c26a97c..9105fe88862966018b749321549e5a9aaeb5cad8 100644 --- a/paddle/fluid/operators/controlflow/fetch_v2_op.cc +++ b/paddle/fluid/operators/controlflow/fetch_v2_op.cc @@ -156,7 +156,8 @@ class FetchV2Kernel { } auto *dst_item = &(PADDLE_GET(phi::DenseTensor, fetch_list->at(col))); bool check_place = platform::is_cpu_place(src_item.place()) || - platform::is_cuda_pinned_place(src_item.place()); + platform::is_cuda_pinned_place(src_item.place()) || + platform::is_custom_place(src_item.place()); PADDLE_ENFORCE_EQ( check_place, true,