2 // Copyright (c) 2016 Intel Corporation
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 ///////////////////////////////////////////////////////////////////////////////////////////////////
20 #include "engine_impl.h"
21 #include "kernel_selector_common.h"
22 #include "kernel_runner_interface.h"
25 namespace cldnn { namespace gpu {
27 class kernel_runner : public kernel_selector::KernelRunnerInterface
31 kernel_runner(engine_impl& engine_ref, bool weights_and_bias_exist = false);
33 std::vector<uint64_t> run_kernels(const kernel_selector::KernelsData& kernelsData) override;
37 const int compilation_batch_size = 50;
38 const int runs_per_kernel = 3;
40 void prepare_kernel_args(const kernel_selector::KernelsData& kernels_data, gpu::kernel::kernel_arguments_data& args);
42 engine_impl::ptr engine;
43 bool weights_and_bias_exist;
44 std::vector<memory_impl::cptr> input_buffers;
45 std::vector<memory_impl::ptr> output_buffers;
46 std::vector<memory_impl::cptr> weight_buffers;
47 std::vector<memory_impl::cptr> bias_buffers;
50 //////////////////////////////////////////////////////////////////////////////////////////////////////////