From 9a3e044791e15d3e914d87686c64aced1521f458 Mon Sep 17 00:00:00 2001 From: Yohann Uguen Date: Thu, 11 May 2023 00:53:23 -0700 Subject: [PATCH] fix USM check Signed-off-by: Yohann Uguen --- .../DesignPatterns/io_streaming/src/FakeIOPipes.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/src/FakeIOPipes.hpp b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/src/FakeIOPipes.hpp index 27321086fb..48cd914670 100644 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/src/FakeIOPipes.hpp +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/src/FakeIOPipes.hpp @@ -66,16 +66,13 @@ class ProducerConsumerBaseImpl { // check for USM support device d = q.get_device(); -#if defined (IS_BSP) - // make sure the device supports USM device allocations in BSP mode - if (!d.get_info() && use_host_alloc) { + if (use_host_alloc && !d.get_info()) { std::cerr << "ERROR: The selected device does not support USM host" << " allocations\n"; std::terminate(); } -#endif - if (!d.get_info()) { + if (!use_host_alloc && !d.get_info()) { std::cerr << "ERROR: The selected device does not support USM device" << " allocations\n"; std::terminate();