1
1
// REQUIRES: aspect-ext_oneapi_bindless_images
2
2
3
- // UNSUPPORTED: hip || level_zero
3
+ // UNSUPPORTED: hip
4
4
// UNSUPPORTED-INTENDED: Image channels queries not working correctly on HIP.
5
- // Also, the feature is not fully implemented in the Level Zero stack.
6
5
7
6
// RUN: %{build} -o %t.out
8
7
// RUN: %{run-unfiltered-devices} %t.out
9
8
10
9
#include < iostream>
11
10
#include < sycl/detail/core.hpp>
12
-
13
11
#include < sycl/ext/oneapi/bindless_images.hpp>
14
12
15
13
// Uncomment to print additional test information
@@ -34,10 +32,6 @@ int main() {
34
32
bool validated = true ;
35
33
36
34
try {
37
- // Submit dummy kernel to let the runtime decide the backend (CUDA)
38
- // Without this, the default Level Zero backend is active
39
- q.submit ([&](sycl::handler &cgh) { cgh.single_task ([]() {}); });
40
-
41
35
// Extension: image descriptor - can use the same for both images
42
36
sycl::ext::oneapi::experimental::image_descriptor desc (
43
37
{width, height, depth}, 1 , sycl::image_channel_type::signed_int32);
@@ -46,131 +40,6 @@ int main() {
46
40
// Input images memory
47
41
sycl::ext::oneapi::experimental::image_mem imgMem (desc, dev, ctxt);
48
42
49
- // Extension: query for bindless image support -- device aspects
50
- bool bindlessSupport = dev.has (sycl::aspect::ext_oneapi_bindless_images);
51
- bool bindlessSharedUsmSupport =
52
- dev.has (sycl::aspect::ext_oneapi_bindless_images_shared_usm);
53
- bool usm1dSupport =
54
- dev.has (sycl::aspect::ext_oneapi_bindless_images_1d_usm);
55
- bool usm2dSupport =
56
- dev.has (sycl::aspect::ext_oneapi_bindless_images_2d_usm);
57
-
58
- #ifdef VERBOSE_PRINT
59
- std::cout << " bindless_images_support: " << bindlessSupport
60
- << " \n bindless_images_shared_usm_support: "
61
- << bindlessSharedUsmSupport
62
- << " \n bindless_images_1d_usm_support: " << usm1dSupport
63
- << " \n bindless_images_2d_usm_support: " << usm2dSupport << " \n " ;
64
- #endif
65
-
66
- // Extension: query for sampled image fetch capabilities
67
- bool sampledFetch1DUSMSupport =
68
- dev.has (sycl::aspect::ext_oneapi_bindless_sampled_image_fetch_1d_usm);
69
- bool sampledFetch2DUSMSupport =
70
- dev.has (sycl::aspect::ext_oneapi_bindless_sampled_image_fetch_2d_usm);
71
- bool sampledFetch1DSupport =
72
- dev.has (sycl::aspect::ext_oneapi_bindless_sampled_image_fetch_1d);
73
- bool sampledFetch2DSupport =
74
- dev.has (sycl::aspect::ext_oneapi_bindless_sampled_image_fetch_2d);
75
- bool sampledFetch3DSupport =
76
- dev.has (sycl::aspect::ext_oneapi_bindless_sampled_image_fetch_3d);
77
-
78
- #ifdef VERBOSE_PRINT
79
- std::cout << " sampledFetch1DUSMSupport: " << sampledFetch1DUSMSupport
80
- << " \n sampledFetch2DUSMSupport: " << sampledFetch2DUSMSupport
81
- << " \n sampledFetch1DSupport: " << sampledFetch1DSupport
82
- << " \n sampledFetch2DSupport: " << sampledFetch2DSupport
83
- << " \n sampledFetch3DSupport: " << sampledFetch3DSupport << " \n " ;
84
- #endif
85
-
86
- // Extension: get pitch alignment information from device -- device info
87
- // Make sure our pitch alignment queries work properly
88
- // These can be different depending on the device so we cannot test that the
89
- // values are correct
90
- // But we should at least see that the query itself works
91
- auto pitchAlign = dev.get_info <
92
- sycl::ext::oneapi::experimental::info::device::image_row_pitch_align>();
93
- auto maxPitch = dev.get_info <sycl::ext::oneapi::experimental::info::device::
94
- max_image_linear_row_pitch>();
95
- auto maxWidth = dev.get_info <sycl::ext::oneapi::experimental::info::device::
96
- max_image_linear_width>();
97
- auto maxheight = dev.get_info <sycl::ext::oneapi::experimental::info::
98
- device::max_image_linear_height>();
99
-
100
- #ifdef VERBOSE_PRINT
101
- std::cout << " image_row_pitch_align: " << pitchAlign
102
- << " \n max_image_linear_row_pitch: " << maxPitch
103
- << " \n max_image_linear_width: " << maxWidth
104
- << " \n max_image_linear_height: " << maxheight << " \n " ;
105
- #endif
106
-
107
- // Extension: query for bindless image mipmaps support -- aspects & info
108
- bool mipmapSupport = dev.has (sycl::aspect::ext_oneapi_mipmap);
109
- bool mipmapAnisotropySupport =
110
- dev.has (sycl::aspect::ext_oneapi_mipmap_anisotropy);
111
- float mipmapMaxAnisotropy = dev.get_info <
112
- sycl::ext::oneapi::experimental::info::device::mipmap_max_anisotropy>();
113
- bool mipmapLevelReferenceSupport =
114
- dev.has (sycl::aspect::ext_oneapi_mipmap_level_reference);
115
-
116
- #ifdef VERBOSE_PRINT
117
- std::cout << " mipmapSupport: " << mipmapSupport
118
- << " \n mipmapAnisotropySupport: " << mipmapAnisotropySupport
119
- << " \n mipmapMaxAnisotropy: " << mipmapMaxAnisotropy
120
- << " \n mipmapLevelReferenceSupport: "
121
- << mipmapLevelReferenceSupport << " \n " ;
122
- #endif
123
-
124
- // Extension: query for bindless image cubemaps support -- aspects.
125
- bool cubemapSupport = dev.has (sycl::aspect::ext_oneapi_cubemap);
126
- bool cubemapSeamlessFilterSupport =
127
- dev.has (sycl::aspect::ext_oneapi_cubemap_seamless_filtering);
128
-
129
- #ifdef VERBOSE_PRINT
130
- std::cout << " cubemapSupport: " << cubemapSupport
131
- << " \n cubemapSeamlessFilterSupport: "
132
- << cubemapSeamlessFilterSupport << " \n " ;
133
- #endif
134
-
135
- // Extension: query for bindless image interop support -- device aspects
136
- bool externalMemoryImportSupport =
137
- dev.has (sycl::aspect::ext_oneapi_external_memory_import);
138
- bool externalSemaphoreImportSupport =
139
- dev.has (sycl::aspect::ext_oneapi_external_semaphore_import);
140
-
141
- #ifdef VERBOSE_PRINT
142
- std::cout << " externalMemoryImportSupport: " << externalMemoryImportSupport
143
- << " \n externalSemaphoreImportSupport: "
144
- << externalSemaphoreImportSupport << " \n " ;
145
- #endif
146
-
147
- // Extension: query for bindless image array support - device aspect
148
- bool imageArraySupport = dev.has (sycl::aspect::ext_oneapi_image_array);
149
-
150
- #ifdef VERBOSE_PRINT
151
- std::cout << " imageArraySupport: " << imageArraySupport << " \n " ;
152
- #endif
153
-
154
- // Extension: query for bindless image unique addressing support - device
155
- // aspect
156
- bool uniqueAddrSupport =
157
- dev.has (sycl::aspect::ext_oneapi_unique_addressing_per_dim);
158
-
159
- #ifdef VERBOSE_PRINT
160
- std::cout << " uniqueAddrSupport: " << uniqueAddrSupport << " \n " ;
161
- #endif
162
-
163
- // Extension: query for usm sample support - device aspect
164
- bool usm1DSampleSupport =
165
- dev.has (sycl::aspect::ext_oneapi_bindless_images_sample_1d_usm);
166
- bool usm2DSampleSupport =
167
- dev.has (sycl::aspect::ext_oneapi_bindless_images_sample_2d_usm);
168
-
169
- #ifdef VERBOSE_PRINT
170
- std::cout << " usm1DSampleSupport: " << usm1DSampleSupport << " \n " ;
171
- std::cout << " usm2DSampleSupport: " << usm2DSampleSupport << " \n " ;
172
- #endif
173
-
174
43
auto rangeMem = imgMem.get_range ();
175
44
auto range = sycl::ext::oneapi::experimental::get_image_range (
176
45
imgMem.get_handle (), dev, ctxt);
0 commit comments