From ed1678aad3a3ed12fd50dfd0a37bb9d52df5c766 Mon Sep 17 00:00:00 2001 From: seemingwang Date: Wed, 27 Apr 2022 15:32:37 +0800 Subject: [PATCH] fix test api problem (#42297) * extract sub-graph * graph-engine merging * fix * fix * fix heter-ps config * test performance * test performance * test performance * test * test * update bfs * change cmake * test * test gpu speed * gpu_graph_engine optimization * add dsm sample method * add graph_neighbor_sample_v2 * Add graph_neighbor_sample_v2 * fix for loop * add cpu sample interface * fix kernel judgement * add ssd layer to graph_engine * fix allocation * fix syntax error * fix syntax error * fix pscore class * fix * change index settings * recover test * recover test * fix spelling * recover * fix * move cudamemcpy after cuda stream sync * fix linking problem * remove comment * add cpu test * test * add cpu test * change comment * combine feature table and graph table * test * test * pybind * test * test * test * test * pybind * pybind * fix cmake * pybind * fix * fix * add pybind * add pybind * optimize pybind * test * fix pybind * fix * pybind change * remove file Co-authored-by: DesmonDay <908660116@qq.com> --- .../fleet/heter_ps/.CMakeLists.txt.swp | Bin 12288 -> 0 bytes .../fleet/heter_ps/graph_gpu_wrapper.cu | 16 ++++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 paddle/fluid/framework/fleet/heter_ps/.CMakeLists.txt.swp diff --git a/paddle/fluid/framework/fleet/heter_ps/.CMakeLists.txt.swp b/paddle/fluid/framework/fleet/heter_ps/.CMakeLists.txt.swp deleted file mode 100644 index 7d3f69e7424d33094dfdd9a2da0d3110a4895c8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeHNOOM+`9G?Q^QD{LF!G*&>ddQ;Y$*bamvX0q?=3&`M+dUb_nZzbe?Db=lP_0^t z55O1TMh`t8@d>!WfeR;)ID$AJ&WJmId+c~(Cu}R|0Xmj`Yk9{1$Nc_}nP@$%UT<~q zyXChKTrVKBTIj=1-}&&utFIvB+O{7KpLVT|s-JSYGrr_RTkQOvNW~%%$!duvz6r96-gV7EK+gkZEOYRs4{l78Clrwv@*5`@hb-L ziK{wZMd)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HHvS{n_CMGmve@xz3(x zS8>;6fi&1de*rIcBK80P diff --git a/paddle/fluid/framework/fleet/heter_ps/graph_gpu_wrapper.cu b/paddle/fluid/framework/fleet/heter_ps/graph_gpu_wrapper.cu index e99a0f4fe11..b0899b4a7f5 100644 --- a/paddle/fluid/framework/fleet/heter_ps/graph_gpu_wrapper.cu +++ b/paddle/fluid/framework/fleet/heter_ps/graph_gpu_wrapper.cu @@ -288,18 +288,18 @@ std::vector GraphGpuWrapper::graph_neighbor_sample( } /* VLOG(0) << "cumsum " << cumsum; */ - std::vector res; - res.resize(cumsum * 2); - int count = 0; + std::vector cpu_key, res; + cpu_key.resize(key.size() * sample_size); + + cudaMemcpy(cpu_key.data(), neighbor_sample_res.val, + key.size() * sample_size * sizeof(int64_t), + cudaMemcpyDeviceToHost); for (int i = 0; i < key.size(); i++) { for (int j = 0; j < actual_sample_size[i]; j++) { - res[count] = key[i]; - count += 1; + res.push_back(key[i]); + res.push_back(cpu_key[i * sample_size + j]); } } - - cudaMemcpy(res.data() + cumsum, neighbor_sample_res.val, - cumsum * sizeof(int64_t), cudaMemcpyDeviceToHost); /* for(int i = 0;i < res.size();i ++) { */ /* VLOG(0) << i << " " << res[i]; */ /* } */ -- GitLab