@@ -101,6 +101,7 @@ struct BufferInterop<backend::opencl, DataT, Dimensions, AllocatorT> {
101101 }
102102};
103103
104+ #if SYCL_EXT_ONEAPI_BACKEND_LEVEL_ZERO
104105template <backend BackendName, typename DataT, int Dimensions,
105106 typename AllocatorT>
106107auto get_native_buffer (const buffer<DataT, Dimensions, AllocatorT, void > &Obj)
@@ -115,6 +116,7 @@ auto get_native_buffer(const buffer<DataT, Dimensions, AllocatorT, void> &Obj)
115116 PI_ERROR_INVALID_OPERATION);
116117 return Obj.template getNative <BackendName>();
117118}
119+ #endif
118120} // namespace detail
119121
120122template <backend BackendName, class SyclObjectT >
@@ -147,6 +149,7 @@ auto get_native(const buffer<DataT, Dimensions, AllocatorT> &Obj)
147149 return detail::get_native_buffer<BackendName>(Obj);
148150}
149151
152+ #if SYCL_BACKEND_OPENCL
150153template <>
151154inline backend_return_t <backend::opencl, event>
152155get_native<backend::opencl, event>(const event &Obj) {
@@ -164,7 +167,9 @@ get_native<backend::opencl, event>(const event &Obj) {
164167 }
165168 return ReturnValue;
166169}
170+ #endif
167171
172+ #if SYCL_EXT_ONEAPI_BACKEND_CUDA
168173template <>
169174inline backend_return_t <backend::ext_oneapi_cuda, device>
170175get_native<backend::ext_oneapi_cuda, device>(const device &Obj) {
@@ -178,6 +183,7 @@ get_native<backend::ext_oneapi_cuda, device>(const device &Obj) {
178183 return static_cast <backend_return_t <backend::ext_oneapi_cuda, device>>(
179184 Obj.getNative ());
180185}
186+ #endif
181187
182188// Native handle of an accessor should be accessed through interop_handler
183189template <backend BackendName, typename DataT, int Dimensions,
0 commit comments