1/*******************************************************************************
2* Copyright 2020-2021 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*******************************************************************************/
16
17#include "gpu/jit/gen9_simple_sum.hpp"
18
19#include "gpu/jit/gen9_simple_sum_kernel_f32.hpp"
20#include "gpu/ocl/ocl_engine.hpp"
21#include "gpu/ocl/ocl_gpu_kernel.hpp"
22
23namespace dnnl {
24namespace impl {
25namespace gpu {
26namespace jit {
27
28status_t gen9_simple_sum_t::init(engine_t *engine) {
29 compute::kernel_ctx_t kernel_ctx;
30
31 auto *gpu_engine = utils::downcast<ocl::ocl_gpu_engine_t *>(engine);
32 if (!gpu_engine) return status::runtime_error;
33
34 auto jitter = gen9_simple_sum_kernel_f32_t();
35 CHECK(create_kernel(engine, &kernel_, &jitter));
36
37 return status::success;
38}
39
40} // namespace jit
41} // namespace gpu
42} // namespace impl
43} // namespace dnnl
44