Skip to content

Commit 8c4d9a5

Browse files
authored
[SYCL] Query USM buffer location extension only if property is passed to malloc_shared (#6268)
This aligns the implementation with malloc_host and avoids an unneeded call in the case where the FPGA backend is used without buffer location. This amends #6218 See also #6220
1 parent 25249ab commit 8c4d9a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/source/detail/usm/usm_impl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ void *alignedAlloc(size_t Alignment, size_t Size, const context &Ctxt,
183183
*PropsIter++ = PI_MEM_ALLOC_DEVICE_READ_ONLY;
184184
}
185185

186-
if (Dev.has_extension("cl_intel_mem_alloc_buffer_location") &&
187-
PropList.has_property<cl::sycl::ext::intel::experimental::property::
188-
usm::buffer_location>()) {
186+
if (PropList.has_property<cl::sycl::ext::intel::experimental::property::
187+
usm::buffer_location>() &&
188+
Dev.has_extension("cl_intel_mem_alloc_buffer_location")) {
189189
*PropsIter++ = PI_MEM_USM_ALLOC_BUFFER_LOCATION;
190190
*PropsIter++ = PropList
191191
.get_property<cl::sycl::ext::intel::experimental::

0 commit comments

Comments
 (0)