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

Method prepare

src/runtime/NEON/functions/NEGEMMConv2d.cpp:97–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void NEGEMMConv2d::prepare()
98{
99 if (!_impl->is_prepared)
100 {
101 allocate_tensors(_impl->aux_mem_req, _impl->workspace);
102 _impl->op->prepare(_impl->prep_pack);
103
104 auto has_reshape =
105 std::find_if(_impl->aux_mem_req.begin(), _impl->aux_mem_req.end(),
106 [](const MemoryInfo &m) -> bool { return m.lifetime == MemoryLifetime::Persistent; });
107
108 if (has_reshape != std::end(_impl->aux_mem_req))
109 {
110 _impl->weights->mark_as_unused();
111 }
112 else
113 {
114 _impl->run_pack.add_const_tensor(ACL_SRC_1, _impl->weights);
115 }
116
117 // Release temporary tensors that are only used in prepare stage
118 release_temporaries<Tensor>(_impl->aux_mem_req, _impl->workspace);
119 _impl->is_prepared = true;
120 }
121}
122} // namespace arm_compute

Callers

nothing calls this directly

Calls 6

allocate_tensorsFunction · 0.85
endFunction · 0.85
mark_as_unusedMethod · 0.80
add_const_tensorMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected