File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
DirectProgramming/C++SYCL_FPGA/Tutorials/Features/stall_enable/src Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,21 @@ if(WIN32)
3030 set (WIN_FLAG "/EHsc" )
3131endif ()
3232
33+ # Choose the random seed for the hardware compile
34+ # e.g. cmake .. -DSEED=7
35+ if (NOT DEFINED SEED)
36+ # Seed 1 fails for S10 on Windows
37+ set (SEED 2)
38+ else ()
39+ message (STATUS "Seed explicitly set to ${SEED} " )
40+ endif ()
41+
42+ if (IGNORE_DEFAULT_SEED)
43+ set (SEED_FLAG "" )
44+ else ()
45+ set (SEED_FLAG "-Xsseed=${SEED} " )
46+ endif ()
47+
3348# A SYCL ahead-of-time (AoT) compile processes the device code in two stages.
3449# 1. The "compile" stage compiles the device code to an intermediate representation (SPIR-V).
3550# 2. The "link" stage invokes the compiler's FPGA backend before linking.
@@ -39,7 +54,7 @@ set(EMULATOR_LINK_FLAGS "-fsycl -fintelfpga")
3954set (SIMULATOR_COMPILE_FLAGS "-fsycl -fintelfpga -Wall ${WIN_FLAG} ${HYPER_FLAG} -Xssimulation -DFPGA_SIMULATOR" )
4055set (SIMULATOR_LINK_FLAGS "-fsycl -fintelfpga -Xssimulation -Xstarget=${FPGA_DEVICE} ${HYPER_FLAG} ${USER_HARDWARE_FLAGS} " )
4156set (HARDWARE_COMPILE_FLAGS "-fsycl -fintelfpga -Wall ${WIN_FLAG} ${HYPER_FLAG} -DFPGA_HARDWARE" )
42- set (HARDWARE_LINK_FLAGS "-fsycl -fintelfpga -Xshardware -Xstarget=${FPGA_DEVICE} ${HYPER_FLAG} ${USER_HARDWARE_FLAGS} " )
57+ set (HARDWARE_LINK_FLAGS "-fsycl -fintelfpga -Xshardware ${SEED_FLAG} -Xstarget=${FPGA_DEVICE} ${HYPER_FLAG} ${USER_HARDWARE_FLAGS} " )
4358# use cmake -D USER_HARDWARE_FLAGS=<flags> to set extra flags for FPGA backend compilation
4459
4560###############################################################################
You can’t perform that action at this time.
0 commit comments