Skip to content

Commit b93d822

Browse files
committed
globals: make acl_get_offline_device_user_setting return number of simulation device when simulation spec dir shadows CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
1 parent f7798d0 commit b93d822

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/acl_globals.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ const char *acl_get_offline_device_user_setting(int *use_offline_only_ret) {
108108
}
109109
} else {
110110
// Look for multi-process simulator before old simulator.
111-
// Check if simulation board spec directory is set, which shadows
112-
// CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
113-
setting = acl_getenv(ACL_MPSIM_BOARD_SPEC_DIR);
114-
if (!setting) {
115-
setting = acl_getenv("CL_CONTEXT_MPSIM_DEVICE_INTELFPGA");
111+
setting = acl_getenv("CL_CONTEXT_MPSIM_DEVICE_INTELFPGA");
112+
// Check if simulation board spec directory is set, which implies
113+
// CL_CONTEXT_MPSIM_DEVICE_INTELFPGA if that is not set
114+
if (acl_getenv(ACL_MPSIM_BOARD_SPEC_DIR) && (!setting)) {
115+
setting = "1"; // Use 1 simulator device by default
116116
}
117117
if (setting) {
118118
use_offline_only = ACL_CONTEXT_MPSIM;

0 commit comments

Comments
 (0)