Skip to content

Commit 2063364

Browse files
authored
FPGA: add USM_HOST_ALLOCATIONS_ENABLED, removed unused variable (#1215)
1 parent 10f7fb3 commit 2063364

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

DirectProgramming/DPC++FPGA/ReferenceDesigns/gzip/src/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,16 @@ endif()
8282

8383
# Presence of USM host allocations (and whether to turn on enable the low-latency target) is detected automatically by
8484
# looking at the name of the BSP, or manually by the user when running CMake.
85-
# E.g., cmake .. -DUSER_ENABLE_USM=1
86-
if(FPGA_DEVICE MATCHES ".*usm.*" OR USER_ENABLE_USM)
87-
set(USM_ENABLED 1)
88-
elseif(LOW_LATENCY)
85+
# E.g., cmake .. -DUSM_HOST_ALLOCATIONS_ENABLED=1
86+
if(LOW_LATENCY AND NOT FPGA_DEVICE MATCHES ".usm.*" AND (NOT DEFINED USM_HOST_ALLOCATIONS_ENABLED OR USM_HOST_ALLOCATIONS_ENABLED STREQUAL "0"))
8987
# Low latency design requires USM, so error out
9088
message(FATAL_ERROR "Error: The Low Latency variant of the design requires USM host allocations")
9189
endif()
9290

91+
if(USM_HOST_ALLOCATIONS_ENABLED)
92+
message(STATUS "USM_HOST_ALLOCATIONS_ENABLED set manually!")
93+
endif()
94+
9395
message(STATUS "NUM_ENGINES=${NUM_ENGINES}")
9496
message(STATUS "SEED=${SEED}")
9597
message(STATUS "NUM_REORDER=${NUM_REORDER}")

0 commit comments

Comments
 (0)