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

Method prepare

src/runtime/CL/functions/CLGEMMDeconvolutionLayer.cpp:427–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427void CLGEMMDeconvolutionLayer::prepare()
428{
429 if (!_is_prepared)
430 {
431 ARM_COMPUTE_ERROR_ON(!_original_weights->is_used());
432
433 if (_is_nchw)
434 {
435 _permuted_weights.allocator()->allocate();
436 _permute_weights_to_nhwc.run();
437 }
438
439 _reshaped_weights.allocator()->allocate();
440 _reshape_weights.run();
441
442 if (_is_nchw)
443 {
444 _permuted_weights.allocator()->free();
445 }
446
447 _reshaped_weights_t.allocator()->allocate();
448 _transpose_weights.run();
449
450 // Prepare gemm
451 if (!_is_quantized)
452 {
453 _mm_gemm.prepare();
454 }
455 else
456 {
457 _mm_gemmlowp.prepare();
458 }
459
460 // Free resources
461 if (!_reshaped_weights_t.is_used())
462 {
463 _reshaped_weights_t.allocator()->free();
464 }
465
466 _original_weights->mark_as_unused();
467 _is_prepared = true;
468 }
469}
470} // namespace arm_compute

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected