|
6 | 6 | //
|
7 | 7 | //===----------------------------------------------------------------------===//
|
8 | 8 |
|
9 |
| -#include <CL/sycl/detail/common.hpp> |
10 |
| -#include <CL/sycl/info/info_desc.hpp> |
11 |
| -#include <CL/sycl/program.hpp> |
12 | 9 | #include <detail/context_impl.hpp>
|
13 | 10 | #include <detail/kernel_impl.hpp>
|
14 |
| -#include <detail/kernel_info.hpp> |
15 | 11 | #include <detail/program_impl.hpp>
|
16 | 12 |
|
17 | 13 | #include <memory>
|
@@ -63,121 +59,6 @@ kernel_impl::~kernel_impl() {
|
63 | 59 | }
|
64 | 60 | }
|
65 | 61 |
|
66 |
| -template <info::kernel param> |
67 |
| -typename info::param_traits<info::kernel, param>::return_type |
68 |
| -kernel_impl::get_info() const { |
69 |
| - if (is_host()) { |
70 |
| - // TODO implement |
71 |
| - assert(0 && "Not implemented"); |
72 |
| - } |
73 |
| - return get_kernel_info< |
74 |
| - typename info::param_traits<info::kernel, param>::return_type, |
75 |
| - param>::get(this->getHandleRef(), getPlugin()); |
76 |
| -} |
77 |
| - |
78 |
| -template <> context kernel_impl::get_info<info::kernel::context>() const { |
79 |
| - return createSyclObjFromImpl<context>(MContext); |
80 |
| -} |
81 |
| - |
82 |
| -template <> program kernel_impl::get_info<info::kernel::program>() const { |
83 |
| - return createSyclObjFromImpl<program>(MProgramImpl); |
84 |
| -} |
85 |
| - |
86 |
| -template <info::kernel_device_specific param> |
87 |
| -typename info::param_traits<info::kernel_device_specific, param>::return_type |
88 |
| -kernel_impl::get_info(const device &Device) const { |
89 |
| - if (is_host()) { |
90 |
| - return get_kernel_device_specific_info_host<param>(Device); |
91 |
| - } |
92 |
| - return get_kernel_device_specific_info< |
93 |
| - typename info::param_traits<info::kernel_device_specific, |
94 |
| - param>::return_type, |
95 |
| - param>::get(this->getHandleRef(), getSyclObjImpl(Device)->getHandleRef(), |
96 |
| - getPlugin()); |
97 |
| -} |
98 |
| - |
99 |
| -template <info::kernel_device_specific param> |
100 |
| -typename info::param_traits<info::kernel_device_specific, param>::return_type |
101 |
| -kernel_impl::get_info( |
102 |
| - const device &Device, |
103 |
| - typename info::param_traits<info::kernel_device_specific, param>::input_type |
104 |
| - Value) const { |
105 |
| - if (is_host()) { |
106 |
| - throw runtime_error("Sub-group feature is not supported on HOST device.", |
107 |
| - PI_INVALID_DEVICE); |
108 |
| - } |
109 |
| - return get_kernel_device_specific_info_with_input<param>::get( |
110 |
| - this->getHandleRef(), getSyclObjImpl(Device)->getHandleRef(), Value, |
111 |
| - getPlugin()); |
112 |
| -} |
113 |
| - |
114 |
| -template <info::kernel_work_group param> |
115 |
| -typename info::param_traits<info::kernel_work_group, param>::return_type |
116 |
| -kernel_impl::get_work_group_info(const device &Device) const { |
117 |
| - return get_info< |
118 |
| - info::compatibility_param_traits<info::kernel_work_group, param>::value>( |
119 |
| - Device); |
120 |
| -} |
121 |
| - |
122 |
| -template <info::kernel_sub_group param> |
123 |
| -typename info::param_traits<info::kernel_sub_group, param>::return_type |
124 |
| -kernel_impl::get_sub_group_info(const device &Device) const { |
125 |
| - return get_info< |
126 |
| - info::compatibility_param_traits<info::kernel_sub_group, param>::value>( |
127 |
| - Device); |
128 |
| -} |
129 |
| - |
130 |
| -template <info::kernel_sub_group param> |
131 |
| -typename info::param_traits<info::kernel_sub_group, param>::return_type |
132 |
| -kernel_impl::get_sub_group_info( |
133 |
| - const device &Device, |
134 |
| - typename info::param_traits<info::kernel_sub_group, param>::input_type |
135 |
| - Value) const { |
136 |
| - return get_info< |
137 |
| - info::compatibility_param_traits<info::kernel_sub_group, param>::value>( |
138 |
| - Device, Value); |
139 |
| -} |
140 |
| - |
141 |
| -#define __SYCL_PARAM_TRAITS_SPEC(param_type, param, ret_type) \ |
142 |
| - template ret_type kernel_impl::get_info<info::param_type::param>() const; |
143 |
| - |
144 |
| -#include <CL/sycl/info/kernel_traits.def> |
145 |
| - |
146 |
| -#undef __SYCL_PARAM_TRAITS_SPEC |
147 |
| - |
148 |
| -#define __SYCL_PARAM_TRAITS_SPEC(param_type, param, ret_type) \ |
149 |
| - template ret_type kernel_impl::get_info<info::param_type::param>( \ |
150 |
| - const device &) const; |
151 |
| -#define __SYCL_PARAM_TRAITS_SPEC_WITH_INPUT(param_type, param, ret_type, \ |
152 |
| - in_type) \ |
153 |
| - template ret_type kernel_impl::get_info<info::param_type::param>( \ |
154 |
| - const device &, in_type) const; |
155 |
| - |
156 |
| -#include <CL/sycl/info/kernel_device_specific_traits.def> |
157 |
| - |
158 |
| -#undef __SYCL_PARAM_TRAITS_SPEC |
159 |
| -#undef __SYCL_PARAM_TRAITS_SPEC_WITH_INPUT |
160 |
| - |
161 |
| -#define __SYCL_PARAM_TRAITS_SPEC(param_type, param, ret_type) \ |
162 |
| - template ret_type kernel_impl::get_work_group_info<info::param_type::param>( \ |
163 |
| - const device &) const; |
164 |
| - |
165 |
| -#include <CL/sycl/info/kernel_work_group_traits.def> |
166 |
| - |
167 |
| -#undef __SYCL_PARAM_TRAITS_SPEC |
168 |
| - |
169 |
| -#define __SYCL_PARAM_TRAITS_SPEC(param_type, param, ret_type) \ |
170 |
| - template ret_type kernel_impl::get_sub_group_info<info::param_type::param>( \ |
171 |
| - const device &) const; |
172 |
| -#define __SYCL_PARAM_TRAITS_SPEC_WITH_INPUT(param_type, param, ret_type, \ |
173 |
| - in_type) \ |
174 |
| - template ret_type kernel_impl::get_sub_group_info<info::param_type::param>( \ |
175 |
| - const device &, in_type) const; |
176 |
| - |
177 |
| -#include <CL/sycl/info/kernel_sub_group_traits.def> |
178 |
| - |
179 |
| -#undef __SYCL_PARAM_TRAITS_SPEC |
180 |
| -#undef __SYCL_PARAM_TRAITS_SPEC_WITH_INPUT |
181 | 62 |
|
182 | 63 | bool kernel_impl::isCreatedFromSource() const {
|
183 | 64 | // TODO it is not clear how to understand whether the SYCL kernel is created
|
|
0 commit comments