| 95 | } |
| 96 | |
| 97 | void 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 |
nothing calls this directly
no test coverage detected