MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / run

Method run

src/gpu/cl/operators/ClScatter.cpp:103–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void ClScatter::run(ITensorPack &tensors)
104{
105 // Get tensors.
106 auto src = tensors.get_const_tensor(ACL_SRC_0);
107 auto updates = tensors.get_const_tensor(ACL_SRC_1);
108 auto indices = tensors.get_const_tensor(ACL_SRC_2);
109 auto dst = tensors.get_tensor(ACL_DST);
110
111 if (_fill_zero)
112 {
113 // Fill destination tensor with 0 values if zero init.
114 ITensorPack fill_pack{{ACL_SRC, dst}};
115 CLScheduler::get().enqueue_op(*_fill_kernel, fill_pack, false);
116 }
117
118 if (_run_copy)
119 {
120 // copy src to dst before scatter op.
121 ITensorPack copy_pack{{ACL_SRC, src}, {ACL_DST, dst}};
122 CLScheduler::get().enqueue_op(*_copy_kernel, copy_pack, false);
123 }
124
125 ITensorPack scatter_pack{{ACL_SRC_0, updates}, {ACL_SRC_1, indices}, {ACL_DST, dst}};
126 CLScheduler::get().enqueue_op(*_scatter_kernel, scatter_pack, false);
127}
128
129} // namespace opencl
130} // namespace arm_compute

Callers

nothing calls this directly

Calls 3

get_const_tensorMethod · 0.80
enqueue_opMethod · 0.80
get_tensorMethod · 0.45

Tested by

no test coverage detected