1 | namespace dnnl { |
2 | namespace impl { |
3 | namespace gpu { |
4 | namespace ocl { |
5 | const char *gen9_gemm_beta_kernel = R"==(/******************************************************************************* )==" "\n" |
6 | R"==(* Copyright 2019-2022 Intel Corporation )==" "\n" |
7 | R"==(* )==" "\n" |
8 | R"==(* Licensed under the Apache License, Version 2.0 (the "License"); )==" "\n" |
9 | R"==(* you may not use this file except in compliance with the License. )==" "\n" |
10 | R"==(* You may obtain a copy of the License at )==" "\n" |
11 | R"==(* )==" "\n" |
12 | R"==(* http: )==" "\n" |
13 | R"==(* )==" "\n" |
14 | R"==(* Unless required by applicable law or agreed to in writing, software )==" "\n" |
15 | R"==(* distributed under the License is distributed on an "AS IS" BASIS, )==" "\n" |
16 | R"==(* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. )==" "\n" |
17 | R"==(* See the License for the specific language governing permissions and )==" "\n" |
18 | R"==(* limitations under the License. )==" "\n" |
19 | R"==(*******************************************************************************/ )==" "\n" |
20 | R"==(#include "gpu/ocl/ocl_types.h" )==" "\n" |
21 | R"==(__kernel void gen9_gemm_beta(long m, long n, float alpha, )==" "\n" |
22 | R"==(__global DST_DATA_T *a, long offset, long lda) { )==" "\n" |
23 | R"==(int idy = get_group_id(1); )==" "\n" |
24 | R"==(long count = m; )==" "\n" |
25 | R"==(offset += idy * lda; )==" "\n" |
26 | R"==(if (idy < n) { )==" "\n" |
27 | R"==(while (count > 0) { )==" "\n" |
28 | R"==(a[offset] = REF_TO_DST(DST_TO_REF(a[offset]) * alpha); )==" "\n" |
29 | R"==(offset++; )==" "\n" |
30 | R"==(count--; )==" "\n" |
31 | R"==(} )==" "\n" |
32 | R"==(} )==" "\n" |
33 | R"==(} )==" "\n" |
34 | R"==()==" ; |
35 | } |
36 | } |
37 | } |
38 | } |