2.8 KiB
Local Response Normalization Driver
Usage
./benchdnn --lrn [benchdnn-knobs] [lrn-knobs] [lrn-desc] ...
where lrn-knobs are:
--dir={FWD_D [default], BWD_D}
-- dnnl_prop_kind_t. Refer to direction for details.--dt={f32 [default], bf16, f16}
-- src and dst data types. Refer to data types for details.--tag={nchw [default], ...}
-- physical src and dst memory layout. Refer to tags for details.--alg={ACROSS [default], WITHIN}
-- lrn algorithm.ACROSS
is dnnl_lrn_across_channels;WITHIN
is dnnl_lrn_within_channel; Refer to LRN primitive for details.--mb=INT
-- override minibatch size specified in the problem description. When set to0
, use minibatch size as defined by the individual problem descriptor. The default is0
.--match=REGEX
-- skip problems not matching the regular expression inREGEX
. By default no pattern is applied (run everything). Note: Windows may interpret only string arguments surrounded by double quotation marks.- Any attributes options. Refer to attributes for details.
and lrn-desc is a problem descriptor. The canonical form is:
mbXicX_idXihXiwX_lsX_alphaF_betaF_kF_nS
Refer to descriptor for details. lsX
stands for LRN local
size value and accepts integer X values. The default is 5
. alphaF
stands for
LRN alpha scale and accepts float F values. The default is 1.f / 8192
. betaF
stands for LRN beta power and accepts float F values. The default is 0.75f
.
kF
stands for LRN k shift and accept float F values. The default is 1.f
.
Refer to LRN primitive
for details.
Essence of Testing
Fill input data with integers so that an output will not overflow in the f16 or bf16 data types.
Examples
Run a set of lrns from an input file with the default settings:
./benchdnn --lrn --batch=inputs/lrn/shapes_ci
Run a named problem with single precision src/dst, iterating by:
- memory layouts, plain and blocked, where channel blocking equals 8 and 16,
- both forward training and backward by data,
- both algorithms supported:
./benchdnn --lrn --dt=f32 --tag=nchw,nChw8c,nChw16c \
--dir=FWD_D,BWD_D --alg=ACROSS,WITHIN \
mb256ic96_ih55n"alexnet:norm1"
More examples with different driver options can be found at inputs/lrn/test_*. Examples with different problem descriptors can be found at inputs/lrn/shapes_*. Examples with different benchdnn common options can be found at driver_conv.md.