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