1namespace dnnl {
2namespace impl {
3namespace gpu {
4namespace ocl {
5const char *ref_deconv_backward_bias_kernel = R"==(/******************************************************************************* )==""\n"
6R"==(* Copyright 2019-2020 Intel Corporation )==""\n"
7R"==(* )==""\n"
8R"==(* Licensed under the Apache License, Version 2.0 (the "License"); )==""\n"
9R"==(* you may not use this file except in compliance with the License. )==""\n"
10R"==(* You may obtain a copy of the License at )==""\n"
11R"==(* )==""\n"
12R"==(* http: )==""\n"
13R"==(* )==""\n"
14R"==(* Unless required by applicable law or agreed to in writing, software )==""\n"
15R"==(* distributed under the License is distributed on an "AS IS" BASIS, )==""\n"
16R"==(* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. )==""\n"
17R"==(* See the License for the specific language governing permissions and )==""\n"
18R"==(* limitations under the License. )==""\n"
19R"==(*******************************************************************************/ )==""\n"
20R"==(#include "gpu/ocl/ocl_types.h" )==""\n"
21R"==(__kernel void ref_deconv_backward_bias( )==""\n"
22R"==(__global DST_DATA_T *diff_dst, __global BIA_DATA_T *diff_bias) { )==""\n"
23R"==(const int g = get_global_id(0) / OC; )==""\n"
24R"==(const int oc = get_global_id(0) % OC; )==""\n"
25R"==(ACC_DATA_T db = 0; )==""\n"
26R"==(for (int mb = 0; mb < MB; ++mb) )==""\n"
27R"==(for (int od = 0; od < OD; ++od) )==""\n"
28R"==(for (int oh = 0; oh < OH; ++oh) )==""\n"
29R"==(for (int ow = 0; ow < OW; ++ow) { )==""\n"
30R"==(uint diff_dst_off = DST_OFF(mb, g * OC + oc, od, oh, ow); )==""\n"
31R"==(db += DST_TO_REF(diff_dst[diff_dst_off]); )==""\n"
32R"==(} )==""\n"
33R"==(diff_bias[g * OC + oc] = TO_BIA(db); )==""\n"
34R"==(} )==""\n"
35R"==()==";
36}
37}
38}
39}