Skip to content

Commit 8fe0113

Browse files
authored
FPGA: fix io_streaming sample USM check in IPA flow (#1648)
This change corrects when the check for device allocations is available for when running the IPA flow.
1 parent bc3f221 commit 8fe0113

File tree

1 file changed

+2
-5
lines changed
  • DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/src

1 file changed

+2
-5
lines changed

DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/src/FakeIOPipes.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,13 @@ class ProducerConsumerBaseImpl {
6666
// check for USM support
6767
device d = q.get_device();
6868

69-
#if defined (IS_BSP)
70-
// make sure the device supports USM device allocations in BSP mode
71-
if (!d.get_info<info::device::usm_host_allocations>() && use_host_alloc) {
69+
if (use_host_alloc && !d.get_info<info::device::usm_host_allocations>()) {
7270
std::cerr << "ERROR: The selected device does not support USM host"
7371
<< " allocations\n";
7472
std::terminate();
7573
}
76-
#endif
7774

78-
if (!d.get_info<info::device::usm_device_allocations>()) {
75+
if (!use_host_alloc && !d.get_info<info::device::usm_device_allocations>()) {
7976
std::cerr << "ERROR: The selected device does not support USM device"
8077
<< " allocations\n";
8178
std::terminate();

0 commit comments

Comments
 (0)