#include <nonius/nonius.h++>
#include <arm_compute/core/Types.h>
#include <arm_compute/runtime/CL/CLScheduler.h>
#include <arm_compute/runtime/CL/CLFunctions.h>
#include <arm_compute/runtime/CL/CLFunctionsEx.h>
#include <cstdint>
#include <cassert>
#include <stdexcept>
#include "acl_common/Utils.h"
Go to the source code of this file.
|
| NONIUS_PARAM (BATCH, 1) |
|
| NONIUS_PARAM (IFM_C, 3) |
|
| NONIUS_PARAM (IFM_H, 244) |
|
| NONIUS_PARAM (IFM_W, 244) |
|
| NONIUS_PARAM (OFM_C, 3) |
|
| NONIUS_PARAM (OFM_H, 244) |
|
| NONIUS_PARAM (OFM_W, 244) |
|
| NONIUS_PARAM (KER_H, 3) |
|
| NONIUS_PARAM (KER_W, 3) |
|
| NONIUS_PARAM (STRIDE_H, 1) |
|
| NONIUS_PARAM (STRIDE_W, 1) |
|
| NONIUS_LOCAL_BENCHMARK ("CLDeconvolutionLayer_NCHW", [](nonius::chronometer meter) { CLDeconvolutionLayer deconv;Configuration p{meter};CLTensor src_tensor{};CLTensor dst_tensor{};CLTensor ker_tensor{};src_tensor.allocator() ->init(p.src_info< NCHW >());dst_tensor.allocator() ->init(p.dst_info< NCHW >());ker_tensor.allocator() ->init(p.ker_info< NCHW >());try { check(deconv.validate(src_tensor.info(), ker_tensor.info(), nullptr, dst_tensor.info(), p.deconv_info, p.inner_border_right, p.inner_border_top));} catch(...) { meter.measure([&](int) { volatile int x=0;return x;});return;} deconv.configure(&src_tensor, &ker_tensor, nullptr, &dst_tensor, p.deconv_info, p.inner_border_right, p.inner_border_top);src_tensor.allocator() ->allocate();ker_tensor.allocator() ->allocate();dst_tensor.allocator() ->allocate();meter.measure([&](int) { deconv.run();CLScheduler::get().sync();});}) NONIUS_LOCAL_BENCHMARK("CLDeconvolutionLayer_NHWC" |
|
src_tensor | allocator () -> init(p.src_info< NHWC >()) |
|
| catch (...) |
|
meter | measure ([&](int) { deconv.run();CLScheduler::get().sync();}) |
|
| NONIUS_LOCAL_BENCHMARK ("CLDeconvolutionLayerEx_NCHW", [](nonius::chronometer meter) { CLDeconvolutionLayerEx deconv;Configuration p{meter};CLTensor src_tensor{};CLTensor dst_tensor{};CLTensor ker_tensor{};src_tensor.allocator() ->init(p.src_info< NCHW >());dst_tensor.allocator() ->init(p.dst_info< NCHW >());ker_tensor.allocator() ->init(p.ker_info< NCHW >());try { check(deconv.validate(src_tensor.info(), ker_tensor.info(), nullptr, dst_tensor.info(), p.deconv_info, p.inner_border_right, p.inner_border_top));} catch(...) { meter.measure([&](int) { volatile int x=0;return x;});return;} deconv.configure(&src_tensor, &ker_tensor, nullptr, &dst_tensor, p.deconv_info, p.inner_border_right, p.inner_border_top);src_tensor.allocator() ->allocate();ker_tensor.allocator() ->allocate();dst_tensor.allocator() ->allocate();meter.measure([&](int) { deconv.run();CLScheduler::get().sync();});}) NONIUS_LOCAL_BENCHMARK("CLDeconvolutionLayerEx_NHWC" |
|
nonius::benchmark_registry & | benchmark_functions (void) |
|
◆ NONIUS_LOCAL_BENCHMARK
#define NONIUS_LOCAL_BENCHMARK |
( |
|
name, |
|
|
|
... |
|
) |
| |
Value: namespace \
{ \
static ::nonius::benchmark_registrar \
NONIUS_DETAIL_UNIQUE_NAME(benchmark_registrar)(local_benchmark_registry(), name, __VA_ARGS__); \
}
Definition at line 210 of file TransposeConv.cpp.
212 { \
213 static ::nonius::benchmark_registrar \
214 NONIUS_DETAIL_UNIQUE_NAME(benchmark_registrar)(local_benchmark_registry(), name, __VA_ARGS__); \
215 }
◆ allocator()
src_tensor allocator |
( |
| ) |
-> init(p.src_info< NHWC >()) |
◆ benchmark_functions()
nonius::benchmark_registry & benchmark_functions |
( |
void |
| ) |
|
◆ catch()
Definition at line 279 of file TransposeConv.cpp.
280 {
281 meter.measure([&](
int) {
282
283 volatile int x = 0;
284 return x;
285 });
286 return;
287 }
References meter.
◆ measure()
◆ NONIUS_LOCAL_BENCHMARK() [1/2]
NONIUS_LOCAL_BENCHMARK |
( |
"CLDeconvolutionLayer_NCHW" |
, |
|
|
[] (nonius::chronometer meter) { CLDeconvolutionLayer deconv;Configuration p{meter};CLTensor src_tensor{};CLTensor dst_tensor{};CLTensor ker_tensor{};src_tensor.allocator() ->init(p.src_info< NCHW >());dst_tensor.allocator() ->init(p.dst_info< NCHW >());ker_tensor.allocator() ->init(p.ker_info< NCHW >());try { check(deconv.validate(src_tensor.info(), ker_tensor.info(), nullptr, dst_tensor.info(), p.deconv_info, p.inner_border_right, p.inner_border_top));} catch(...) { meter.measure([&](int) { volatile int x=0;return x;});return;} deconv.configure(&src_tensor, &ker_tensor, nullptr, &dst_tensor, p.deconv_info, p.inner_border_right, p.inner_border_top);src_tensor.allocator() ->allocate();ker_tensor.allocator() ->allocate();dst_tensor.allocator() ->allocate();meter.measure([&](int) { deconv.run();CLScheduler::get().sync();});} |
|
|
) |
| |
◆ NONIUS_LOCAL_BENCHMARK() [2/2]
NONIUS_LOCAL_BENCHMARK |
( |
"CLDeconvolutionLayerEx_NCHW" |
, |
|
|
[] (nonius::chronometer meter) { CLDeconvolutionLayerEx deconv;Configuration p{meter};CLTensor src_tensor{};CLTensor dst_tensor{};CLTensor ker_tensor{};src_tensor.allocator() ->init(p.src_info< NCHW >());dst_tensor.allocator() ->init(p.dst_info< NCHW >());ker_tensor.allocator() ->init(p.ker_info< NCHW >());try { check(deconv.validate(src_tensor.info(), ker_tensor.info(), nullptr, dst_tensor.info(), p.deconv_info, p.inner_border_right, p.inner_border_top));} catch(...) { meter.measure([&](int) { volatile int x=0;return x;});return;} deconv.configure(&src_tensor, &ker_tensor, nullptr, &dst_tensor, p.deconv_info, p.inner_border_right, p.inner_border_top);src_tensor.allocator() ->allocate();ker_tensor.allocator() ->allocate();dst_tensor.allocator() ->allocate();meter.measure([&](int) { deconv.run();CLScheduler::get().sync();});} |
|
|
) |
| |
◆ NONIUS_PARAM() [1/11]
NONIUS_PARAM |
( |
BATCH |
, |
|
|
1 |
|
|
) |
| |
◆ NONIUS_PARAM() [2/11]
NONIUS_PARAM |
( |
IFM_C |
, |
|
|
3 |
|
|
) |
| |
◆ NONIUS_PARAM() [3/11]
NONIUS_PARAM |
( |
IFM_H |
, |
|
|
244 |
|
|
) |
| |
◆ NONIUS_PARAM() [4/11]
NONIUS_PARAM |
( |
IFM_W |
, |
|
|
244 |
|
|
) |
| |
◆ NONIUS_PARAM() [5/11]
NONIUS_PARAM |
( |
KER_H |
, |
|
|
3 |
|
|
) |
| |
◆ NONIUS_PARAM() [6/11]
NONIUS_PARAM |
( |
KER_W |
, |
|
|
3 |
|
|
) |
| |
◆ NONIUS_PARAM() [7/11]
NONIUS_PARAM |
( |
OFM_C |
, |
|
|
3 |
|
|
) |
| |
◆ NONIUS_PARAM() [8/11]
NONIUS_PARAM |
( |
OFM_H |
, |
|
|
244 |
|
|
) |
| |
◆ NONIUS_PARAM() [9/11]
NONIUS_PARAM |
( |
OFM_W |
, |
|
|
244 |
|
|
) |
| |
◆ NONIUS_PARAM() [10/11]
NONIUS_PARAM |
( |
STRIDE_H |
, |
|
|
1 |
|
|
) |
| |
◆ NONIUS_PARAM() [11/11]
NONIUS_PARAM |
( |
STRIDE_W |
, |
|
|
1 |
|
|
) |
| |
◆ dst_tensor
◆ ker_tensor
◆ meter
nonius::chronometer meter |
◆ src_tensor
deconv configure& src_tensor {} |
◆ try
Initial value:{
p.deconv_info,
p.inner_border_right,
p.inner_border_top))
Definition at line 274 of file TransposeConv.cpp.