19 {
20
21 ActsPlugins::ExecutionContext cpuCtx;
22 cpuCtx.device = ActsPlugins::Device::Cpu();
23 cpuCtx.stream = ctx.stream;
24
25 if (tensors.edgeScores.has_value()) {
26 const auto& scores = tensors.edgeScores.value();
27 auto cpuScores = scores.clone(cpuCtx);
28 m_edgeScores.assign(cpuScores.data(), cpuScores.data() + cpuScores.size());
29 }
30
31 if (tensors.edgeIndex.size() > 0) {
32 const auto& edgeIndex = tensors.edgeIndex;
33 auto cpuIndex = edgeIndex.clone(cpuCtx);
34 m_edgeIndex.assign(cpuIndex.data(), cpuIndex.data() + cpuIndex.size());
35 }
36 }