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

Method configure

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

Source from the content-addressed store, hash-verified

64}
65
66void ClScatter::configure(const CLCompileContext &compile_context,
67 const ITensorInfo *src,
68 const ITensorInfo *updates,
69 const ITensorInfo *indices,
70 ITensorInfo *dst,
71 const ScatterInfo &info)
72{
73 ARM_COMPUTE_ERROR_ON_NULLPTR(updates, indices, dst);
74 ARM_COMPUTE_LOG_PARAMS(src, indices, dst, info);
75
76 // Perform validation step
77 ARM_COMPUTE_ERROR_THROW_ON(validate(src, updates, indices, dst, info));
78 _fill_zero = info.zero_initialization;
79
80 // If necessary, create fill kernel to fill dst tensor.
81 if (_fill_zero)
82 {
83 auto f = std::make_unique<kernels::ClFillKernel>();
84 f->configure(compile_context, dst, PixelValue(0.0f));
85 _fill_kernel = std::move(f);
86 }
87 else if (src != dst) // Check whether copying is necessary
88 {
89 // Fill dst with src copy here.
90 auto j = std::make_unique<kernels::ClCopyKernel>();
91 j->configure(compile_context, src, dst);
92 _copy_kernel = std::move(j);
93 _run_copy = true;
94 }
95
96 // Configure ClScatterKernel
97 auto k = std::make_unique<kernels::ClScatterKernel>();
98 k->set_target(CLScheduler::get().target());
99 k->configure(compile_context, updates, indices, dst, info);
100 _scatter_kernel = std::move(k);
101}
102
103void ClScatter::run(ITensorPack &tensors)
104{

Callers

nothing calls this directly

Calls 4

PixelValueClass · 0.85
validateFunction · 0.50
set_targetMethod · 0.45
targetMethod · 0.45

Tested by

no test coverage detected