[IE CLDNN] Quantized deeplabv3 optimizations (#646)
Enabled dilation for imad dw fsv16 kernel Added argmax and mutable_data to fsv16 white list Enabled byxf input for quantize scale_shift kernel
This commit is contained in:
parent
3863656f44
commit
dbdaaa93dd
@ -66,6 +66,7 @@ ParamsKey kernel_selector::ConvolutionKernel_b_fs_yx_fsv_16_32_imad_dw::GetSuppo
|
||||
k.EnableQuantization(QuantizationType::ASYMMETRIC_DATA_AND_WEIGHTS);
|
||||
k.EnableDepthwiseSeparableOpt();
|
||||
k.EnableGroupedConvolution();
|
||||
k.EnableDilation();
|
||||
return k;
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@ ParamsKey QuantizeKernelScaleShift::GetSupportedKey() const {
|
||||
k.EnableOutputDataType(Datatype::INT8);
|
||||
k.EnableInputLayout(DataLayout::bfyx);
|
||||
k.EnableInputLayout(DataLayout::yxfb);
|
||||
k.EnableInputLayout(DataLayout::byxf);
|
||||
k.EnableInputLayout(DataLayout::bfzyx);
|
||||
k.EnableInputLayout(DataLayout::b_fs_yx_fsv16);
|
||||
k.EnableInputLayout(DataLayout::b_fs_zyx_fsv16);
|
||||
|
@ -367,8 +367,7 @@ bool layout_optimizer::convolution_b_fs_yx_fsv16_opt(layout const &input_layout,
|
||||
weights_layout.size.batch[0] >= 16 &&
|
||||
((conv->groups == 1 && conv->split() == 1) ||
|
||||
conv->groups == static_cast<uint32_t>(input_layout.size.feature[0]) ||
|
||||
conv->split() == static_cast<int32_t>(input_layout.size.feature[0])) &&
|
||||
conv->dilation == tensor{ 1 })
|
||||
conv->split() == static_cast<int32_t>(input_layout.size.feature[0])))
|
||||
return true;
|
||||
// Check for grouped convolution
|
||||
else if (input_layout.size.spatial[2] == 1 && input_layout.size.batch[0] < 16 &&
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "deconvolution_inst.h"
|
||||
#include "detection_output_inst.h"
|
||||
#include "input_layout_inst.h"
|
||||
#include "arg_max_min_inst.h"
|
||||
#include "lstm_inst.h"
|
||||
#include "lstm_elt_inst.h"
|
||||
#include "lstm_gemm_inst.h"
|
||||
@ -1130,7 +1131,9 @@ void program_impl::set_layout_optimizer_attributes(layout_optimizer& lo) {
|
||||
(prim.type() != cldnn::mvn::type_id()
|
||||
|| (prim.as<mvn>().input().get_output_layout().data_type != data_types::u8 &&
|
||||
prim.as<mvn>().input().get_output_layout().data_type != data_types::i8)
|
||||
|| prim.as<mvn>().get_primitive()->across_channels))
|
||||
|| prim.as<mvn>().get_primitive()->across_channels) &&
|
||||
prim.type() != cldnn::arg_max_min::type_id() &&
|
||||
prim.type() != cldnn::mutable_data::type_id())
|
||||
can_use_fsv16 = false;
|
||||
|
||||
// WA to keep bfyx_f16 layout disabled for some topologies where it leads to regressions.
|
||||
|
@ -4746,7 +4746,6 @@ protected:
|
||||
|
||||
build_options opts;
|
||||
opts.set_option(build_option::optimize_data(false));
|
||||
opts.set_option(build_option::graph_dumps_dir("/tmp/cldnn_dumps/"));
|
||||
|
||||
topology topology(input_layout("input", input.get_layout()),
|
||||
data("weights", weights),
|
||||
@ -8214,6 +8213,11 @@ struct params_generator : std::vector<convolution_random_test_all_params> {
|
||||
b, 32, 24, { 19, 19 }, { 3, 3 }, { 1, 1 }, { -1, -1 }, { 2, 2 }, true, 1, input_format, asymm_weights, asymm_data, padded_input });
|
||||
push_back(convolution_random_test_all_params{
|
||||
b, 32, 24, { 19, 19 }, { 3, 3 }, { 2, 2 }, { -1, -1 }, { 2, 2 }, true, 1, input_format, asymm_weights, asymm_data, padded_input });
|
||||
// depthwise + dilation
|
||||
push_back(convolution_random_test_all_params{
|
||||
b, 64, 64, { 19, 19 }, { 3, 3 }, { 1, 1 }, { -1, -1 }, { 2, 2 }, true, 64, input_format, asymm_weights, asymm_data, padded_input });
|
||||
push_back(convolution_random_test_all_params{
|
||||
b, 64, 64, { 19, 19 }, { 3, 3 }, { 2, 2 }, { -1, -1 }, { 2, 2 }, true, 64, input_format, asymm_weights, asymm_data, padded_input });
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user