@@ -105,21 +105,6 @@ template <template <typename> typename CallableT> void runTest(sycl::queue Q) {
105105 sycl::local_accessor<int , 2 > LAcc2D{sycl::range<2 >{1 , 2 }, CGH};
106106 sycl::local_accessor<int , 3 > LAcc3D{sycl::range<3 >{1 , 2 , 3 }, CGH};
107107 sycl::stream Stream{1024 , 32 , CGH};
108- sycl::unsampled_image_accessor<sycl::int4, 1 , sycl::access_mode::read,
109- sycl::image_target::host_task>
110- UImgAcc1D{UImg1D, CGH};
111- sycl::unsampled_image_accessor<sycl::int4, 2 , sycl::access_mode::read,
112- sycl::image_target::host_task>
113- UImgAcc2D{UImg2D, CGH};
114- sycl::unsampled_image_accessor<sycl::int4, 3 , sycl::access_mode::read,
115- sycl::image_target::host_task>
116- UImgAcc3D{UImg3D, CGH};
117- sycl::sampled_image_accessor<sycl::int4, 1 , sycl::image_target::host_task>
118- SImgAcc1D{SImg1D, CGH};
119- sycl::sampled_image_accessor<sycl::int4, 2 , sycl::image_target::host_task>
120- SImgAcc2D{SImg2D, CGH};
121- sycl::sampled_image_accessor<sycl::int4, 3 , sycl::image_target::host_task>
122- SImgAcc3D{SImg3D, CGH};
123108
124109 CallableT<decltype (DAcc1D)>()(DAcc1D);
125110 CallableT<decltype (DAcc2D)>()(DAcc2D);
@@ -128,13 +113,33 @@ template <template <typename> typename CallableT> void runTest(sycl::queue Q) {
128113 CallableT<decltype (LAcc2D)>()(LAcc2D);
129114 CallableT<decltype (LAcc3D)>()(LAcc3D);
130115 CallableT<decltype (Stream)>()(Stream);
131- CallableT<decltype (UImgAcc1D)>()(UImgAcc1D);
132- CallableT<decltype (UImgAcc2D)>()(UImgAcc2D);
133- CallableT<decltype (UImgAcc3D)>()(UImgAcc3D);
134- CallableT<decltype (SImgAcc1D)>()(SImgAcc1D);
135- CallableT<decltype (SImgAcc2D)>()(SImgAcc2D);
136- CallableT<decltype (SImgAcc3D)>()(SImgAcc3D);
137116 });
117+ if (Q.get_device ().has (sycl::aspect::ext_intel_legacy_image)) {
118+ Q.submit ([&](sycl::handler &CGH) {
119+ sycl::unsampled_image_accessor<sycl::int4, 1 , sycl::access_mode::read,
120+ sycl::image_target::host_task>
121+ UImgAcc1D{UImg1D, CGH};
122+ sycl::unsampled_image_accessor<sycl::int4, 2 , sycl::access_mode::read,
123+ sycl::image_target::host_task>
124+ UImgAcc2D{UImg2D, CGH};
125+ sycl::unsampled_image_accessor<sycl::int4, 3 , sycl::access_mode::read,
126+ sycl::image_target::host_task>
127+ UImgAcc3D{UImg3D, CGH};
128+ sycl::sampled_image_accessor<sycl::int4, 1 , sycl::image_target::host_task>
129+ SImgAcc1D{SImg1D, CGH};
130+ sycl::sampled_image_accessor<sycl::int4, 2 , sycl::image_target::host_task>
131+ SImgAcc2D{SImg2D, CGH};
132+ sycl::sampled_image_accessor<sycl::int4, 3 , sycl::image_target::host_task>
133+ SImgAcc3D{SImg3D, CGH};
134+
135+ CallableT<decltype (UImgAcc1D)>()(UImgAcc1D);
136+ CallableT<decltype (UImgAcc2D)>()(UImgAcc2D);
137+ CallableT<decltype (UImgAcc3D)>()(UImgAcc3D);
138+ CallableT<decltype (SImgAcc1D)>()(SImgAcc1D);
139+ CallableT<decltype (SImgAcc2D)>()(SImgAcc2D);
140+ CallableT<decltype (SImgAcc3D)>()(SImgAcc3D);
141+ });
142+ }
138143}
139144
140145template <template <typename > typename CallableT>
@@ -267,49 +272,54 @@ void runTestMulti(sycl::queue Q1) {
267272 sycl::local_accessor<int , 3 > LAcc3D2{sycl::range<3 >{1 , 2 , 3 }, CGH};
268273 sycl::stream Stream1{1024 , 32 , CGH};
269274 sycl::stream Stream2{1024 , 32 , CGH};
270- sycl::unsampled_image_accessor<sycl::int4, 1 , sycl::access_mode::read,
271- sycl::image_target::host_task>
272- UImgAcc1D1{UImg1D1, CGH};
273- sycl::unsampled_image_accessor<sycl::int4, 2 , sycl::access_mode::read,
274- sycl::image_target::host_task>
275- UImgAcc2D1{UImg2D1, CGH};
276- sycl::unsampled_image_accessor<sycl::int4, 3 , sycl::access_mode::read,
277- sycl::image_target::host_task>
278- UImgAcc3D1{UImg3D1, CGH};
279- sycl::unsampled_image_accessor<sycl::int4, 1 , sycl::access_mode::read,
280- sycl::image_target::host_task>
281- UImgAcc1D2{UImg1D2, CGH};
282- sycl::unsampled_image_accessor<sycl::int4, 2 , sycl::access_mode::read,
283- sycl::image_target::host_task>
284- UImgAcc2D2{UImg2D2, CGH};
285- sycl::unsampled_image_accessor<sycl::int4, 3 , sycl::access_mode::read,
286- sycl::image_target::host_task>
287- UImgAcc3D2{UImg3D2, CGH};
288- sycl::sampled_image_accessor<sycl::int4, 1 , sycl::image_target::host_task>
289- SImgAcc1D1{SImg1D1, CGH};
290- sycl::sampled_image_accessor<sycl::int4, 2 , sycl::image_target::host_task>
291- SImgAcc2D1{SImg2D1, CGH};
292- sycl::sampled_image_accessor<sycl::int4, 3 , sycl::image_target::host_task>
293- SImgAcc3D1{SImg3D1, CGH};
294- sycl::sampled_image_accessor<sycl::int4, 1 , sycl::image_target::host_task>
295- SImgAcc1D2{SImg1D2, CGH};
296- sycl::sampled_image_accessor<sycl::int4, 2 , sycl::image_target::host_task>
297- SImgAcc2D2{SImg2D2, CGH};
298- sycl::sampled_image_accessor<sycl::int4, 3 , sycl::image_target::host_task>
299- SImgAcc3D2{SImg3D2, CGH};
300-
301275 CallableT<decltype (DAcc1D1)>()(DAcc1D1, DAcc1D2);
302276 CallableT<decltype (DAcc2D1)>()(DAcc2D1, DAcc2D2);
303277 CallableT<decltype (DAcc3D1)>()(DAcc3D1, DAcc3D2);
304278 CallableT<decltype (LAcc1D1)>()(LAcc1D1, LAcc1D2);
305279 CallableT<decltype (LAcc2D1)>()(LAcc2D1, LAcc2D2);
306280 CallableT<decltype (LAcc3D1)>()(LAcc3D1, LAcc3D2);
307281 CallableT<decltype (Stream1)>()(Stream1, Stream2);
308- CallableT<decltype (UImgAcc1D1)>()(UImgAcc1D1, UImgAcc1D2);
309- CallableT<decltype (UImgAcc2D1)>()(UImgAcc2D1, UImgAcc2D2);
310- CallableT<decltype (UImgAcc3D1)>()(UImgAcc3D1, UImgAcc3D2);
311- CallableT<decltype (SImgAcc1D1)>()(SImgAcc1D1, SImgAcc1D2);
312- CallableT<decltype (SImgAcc2D1)>()(SImgAcc2D1, SImgAcc2D2);
313- CallableT<decltype (SImgAcc3D1)>()(SImgAcc3D1, SImgAcc3D2);
314282 });
283+
284+ if (Q1.get_device ().has (sycl::aspect::ext_intel_legacy_image)) {
285+ Q1.submit ([&](sycl::handler &CGH) {
286+ sycl::unsampled_image_accessor<sycl::int4, 1 , sycl::access_mode::read,
287+ sycl::image_target::host_task>
288+ UImgAcc1D1{UImg1D1, CGH};
289+ sycl::unsampled_image_accessor<sycl::int4, 2 , sycl::access_mode::read,
290+ sycl::image_target::host_task>
291+ UImgAcc2D1{UImg2D1, CGH};
292+ sycl::unsampled_image_accessor<sycl::int4, 3 , sycl::access_mode::read,
293+ sycl::image_target::host_task>
294+ UImgAcc3D1{UImg3D1, CGH};
295+ sycl::unsampled_image_accessor<sycl::int4, 1 , sycl::access_mode::read,
296+ sycl::image_target::host_task>
297+ UImgAcc1D2{UImg1D2, CGH};
298+ sycl::unsampled_image_accessor<sycl::int4, 2 , sycl::access_mode::read,
299+ sycl::image_target::host_task>
300+ UImgAcc2D2{UImg2D2, CGH};
301+ sycl::unsampled_image_accessor<sycl::int4, 3 , sycl::access_mode::read,
302+ sycl::image_target::host_task>
303+ UImgAcc3D2{UImg3D2, CGH};
304+ sycl::sampled_image_accessor<sycl::int4, 1 , sycl::image_target::host_task>
305+ SImgAcc1D1{SImg1D1, CGH};
306+ sycl::sampled_image_accessor<sycl::int4, 2 , sycl::image_target::host_task>
307+ SImgAcc2D1{SImg2D1, CGH};
308+ sycl::sampled_image_accessor<sycl::int4, 3 , sycl::image_target::host_task>
309+ SImgAcc3D1{SImg3D1, CGH};
310+ sycl::sampled_image_accessor<sycl::int4, 1 , sycl::image_target::host_task>
311+ SImgAcc1D2{SImg1D2, CGH};
312+ sycl::sampled_image_accessor<sycl::int4, 2 , sycl::image_target::host_task>
313+ SImgAcc2D2{SImg2D2, CGH};
314+ sycl::sampled_image_accessor<sycl::int4, 3 , sycl::image_target::host_task>
315+ SImgAcc3D2{SImg3D2, CGH};
316+
317+ CallableT<decltype (UImgAcc1D1)>()(UImgAcc1D1, UImgAcc1D2);
318+ CallableT<decltype (UImgAcc2D1)>()(UImgAcc2D1, UImgAcc2D2);
319+ CallableT<decltype (UImgAcc3D1)>()(UImgAcc3D1, UImgAcc3D2);
320+ CallableT<decltype (SImgAcc1D1)>()(SImgAcc1D1, SImgAcc1D2);
321+ CallableT<decltype (SImgAcc2D1)>()(SImgAcc2D1, SImgAcc2D2);
322+ CallableT<decltype (SImgAcc3D1)>()(SImgAcc3D1, SImgAcc3D2);
323+ });
324+ }
315325}
0 commit comments