Commit 3ffccb33 authored by shssf's avatar shssf Committed by Robert Kimball

IntelGPU backend: getting clDNN convolution back with filter=1 (#1543)

parent 5c706276
......@@ -887,16 +887,11 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func)
const CoordinateDiff& pad_below = conv_op->get_padding_below();
const CoordinateDiff& pad_above = conv_op->get_padding_above();
// clDNN failed with filter size 1
const Shape filter_data(get_input_shape(op, 1).cbegin() + 2,
get_input_shape(op, 1).cend());
const size_t filter_size = shape_size(filter_data);
// clDNN has quite limited support for Convolution operation
// following are the checks to go with workaround
if ((win_stride.size() > 2) || (pad_below.size() > 2 || pad_above.size() > 2) ||
(pad_below.at(0) != pad_above.at(0) || pad_below.at(1) != pad_above.at(1)) ||
(win_dilation.size() > 2) || (filter_size < 2) ||
(win_dilation.size() > 2) ||
(data_dilation.size() > 2 || data_dilation.at(0) != 1 || data_dilation.at(1) != 1))
{
do_convolution_operation(topology,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment