mirror of
https://github.com/uxlfoundation/oneDNN.git
synced 2025-10-20 10:03:50 +08:00
2.7 KiB
2.7 KiB
Group Normalization Driver
Usage
./benchdnn --gnorm [benchdnn-knobs] [gnorm-knobs] [gnorm-desc] ...
where gnorm-knobs are:
--dir={FWD_D [default], FWD_I, BWD_D, BWD_DW}
-- dnnl_prop_kind_t. Refer to direction for details.--dt={f32:f32 [default], ...}
-- src and dst data types. Refer to data types for details.--tag={abcd:any [default], ...}
-- physical src and dst memory format. If only src memory format is provided, dst memory format will be set toany
. Refer to tags for details.--flags=[|G|C|H]
-- group normalization flags, defaultnone
; where multiple simultaneous flags are supported.G
is dnnl_use_global_stats;C
is dnnl_use_scale;H
is dnnl_use_shift; Refer to group normalization primitive for details.--inplace=BOOL
-- memory mode for the primitive. Iftrue
, it uses input memory as output, otherwise, input and output are separate. Default isfalse
.--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 gnorm-desc is a problem descriptor. The canonical form is:
gXmbXicX_idXihXiwX_epsF_nS
Refer to descriptor for details. epsF
stands for Group
Normalization epsilon value and accepts float F values. The default is 1.f/16
.
Examples
Run a set of gnorms from an input file, using the default settings:
./benchdnn --gnorm --batch=shapes_ci
Run a named problem with single precision src/dst, iterating by:
- Src/dst memory formats
- forward training, backward by data and weights prop_kinds,
- some flag combinations:
./benchdnn --gnorm --dt=f32 --tag=abc,acb --dir=FWD_D,BWD_DW \
--flags=GCH,CH g5ic5iw10_n"gnorm_test_shape"
Run the same problem as previous but with different data types for source and destination:
./benchdnn --gnorm --dt=bf16:f32 --tag=abc,acb --dir=FWD_D,BWD_DW \
--flags=GCH,CH g5ic5iw10_n"gnorm_test_shape"
More examples with different driver options can be found at inputs/gnorm/test_*. Examples with different problem descriptors can be found at inputs/gnorm/shapes_*. Examples with different benchdnn common options can be found at driver_conv.md.