forward_inference as default direction for a convolution in benchdnn
Good afternoon.
At the moment a convolution primitive for a benchdnn run is created with dnnl_forward_training prop_kind if --dir option is not specified (benchdnn/conv/conv.cpp). However, there is no actual training there, only a call to convolution and reference implementation. May you please comment, why forward_training is the default value and not forward_inference? Similar situation occurs in gtests also (test_convolution_forward_common.hpp).
Best wishes, Aleksandr
Hi @alenik01, thank you for the question.
The main idea was to test bias by default. Due to historical reasons there's no a separate option for conv driver (yet) to distinct bias presence and its data type. FWD_B is responsible for adding bias for now. FWD_I doesn't include bias (though it may happen for inference). Another thing is training most of times uses scratchpad while inference may not.
Actually, there's no much sense to rely on default configuration. It's only done for ability to run bare problem descriptors, sometimes it's useful. Besides of that, there are so many flavors of convolutions that it's better to specify which exactly flavor is desired.
Hope it helps. Thanks.
@dzarukin, many thanks for the detailed explanation.