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

Method prepare

src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp:376–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376void NEFFTConvolutionLayer::prepare()
377{
378 if (!_is_prepared)
379 {
380 // Permute bias to NCHW
381 if (_original_bias != nullptr)
382 {
383 _permuted_bias.allocator()->allocate();
384 _permute_bias_func.run();
385 _original_bias->mark_as_unused();
386 }
387
388 const ITensor *cur_weights = _original_weights;
389
390 // Permute weights
391 if (_needs_permute)
392 {
393 ARM_COMPUTE_ERROR_ON(!cur_weights->is_used());
394
395 _permuted_weights.allocator()->allocate();
396 _permute_weights_func.run();
397 cur_weights->mark_as_unused();
398 cur_weights = &_permuted_weights;
399 }
400
401 // Flip weights
402 _flipped_weights.allocator()->allocate();
403 _flip_weights_func.run();
404 cur_weights->mark_as_unused();
405
406 // Pad weights
407 _padded_weights.allocator()->allocate();
408 _pad_weights_func.run();
409 _flipped_weights.mark_as_unused();
410 _flipped_weights.allocator()->free();
411
412 // Transform weights to frequency domain
413 _transformed_weights.allocator()->allocate();
414 _transform_weights_func->run();
415 _transform_weights_func.reset();
416
417 _padded_weights.mark_as_unused();
418 _padded_weights.allocator()->free();
419
420 _is_prepared = true;
421 }
422}
423} // namespace arm_compute

Callers

nothing calls this directly

Calls 7

mark_as_unusedMethod · 0.80
is_usedMethod · 0.80
allocateMethod · 0.45
allocatorMethod · 0.45
runMethod · 0.45
freeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected