Skip to content

Commit b81ad1a

Browse files
committed
Remove ACL_CONTEXT_MSIM
This is set by the flag CL_CONTEXT_MSIM_DEVICE_INTELFPGA, is unused and safe to remove. Tests Done: Runtime Unit Tests
1 parent 67e23e1 commit b81ad1a

File tree

5 files changed

+3
-38
lines changed

5 files changed

+3
-38
lines changed

include/acl_globals.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ cl_bool acl_init_from_hal_discovery(void);
5353
// Set *use_offline_ret_only = 0
5454
#define ACL_CONTEXT_OFFLINE_AND_AUTODISCOVERY 0
5555
#define ACL_CONTEXT_OFFLINE_ONLY 1
56-
#define ACL_CONTEXT_MSIM 3
5756
#define ACL_CONTEXT_MPSIM 4
5857
const char *acl_get_offline_device_user_setting(int *use_offline_only_ret);
5958

include/acl_hal.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,6 @@ void acl_reset_hal(void);
262262
extern int debug_mode;
263263
int acl_print_debug_msg(const char *msg, ...);
264264

265-
#ifdef __linux__
266-
/// Each HAL must define this function even if it does nothing at all.
267-
/// Assume that we'll only link to one HAL.
268-
ACL_HAL_EXPORT const acl_hal_t *
269-
acl_msim_get_system_definition(acl_system_def_t *system) WEAK;
270-
#endif
271265
ACL_HAL_EXPORT const acl_hal_t *
272266
acl_mmd_get_system_definition(acl_system_def_t *system,
273267
acl_mmd_library_names_t *_libraries_to_load);

include/acl_types.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,8 +1575,7 @@ typedef struct _cl_platform_id
15751575
// any.
15761576
std::string offline_device;
15771577
// Cache context offline mode specified by environment variables
1578-
// CL_CONTEXT_OFFLINE_DEVICE_INTELFPGA, CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
1579-
// or CL_CONTEXT_MSIM_DEVICE_INTELFPGA
1578+
// CL_CONTEXT_OFFLINE_DEVICE_INTELFPGA or CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
15801579
int offline_mode;
15811580

15821581
// Should we track and automatically release leaked objects?

src/acl_globals.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,6 @@ const char *acl_get_offline_device_user_setting(int *use_offline_only_ret) {
117117
if (setting) {
118118
use_offline_only = ACL_CONTEXT_MPSIM;
119119
result = setting;
120-
} else {
121-
setting = acl_getenv("CL_CONTEXT_MSIM_DEVICE_INTELFPGA");
122-
setting_deprecated = acl_getenv("CL_CONTEXT_MSIM_DEVICE_ALTERA");
123-
if (!setting && setting_deprecated) {
124-
setting = setting_deprecated;
125-
if (0 == warn_depr3) {
126-
fprintf(stderr, "[Runtime Warning]: CL_CONTEXT_MSIM_DEVICE_ALTERA "
127-
"has been deprecated. Use "
128-
"CL_CONTEXT_MSIM_DEVICE_INTELFPGA instead.\n");
129-
warn_depr3 = 1;
130-
}
131-
}
132-
if (setting) {
133-
use_offline_only = ACL_CONTEXT_MSIM;
134-
result = 0;
135-
}
136120
}
137121
}
138122

@@ -186,14 +170,6 @@ cl_bool acl_init_from_hal_discovery(void) {
186170
case ACL_CONTEXT_OFFLINE_ONLY:
187171
board_hal = acl_get_offline_hal();
188172
break;
189-
#ifdef __linux__
190-
case ACL_CONTEXT_MSIM:
191-
if (&acl_msim_get_system_definition == NULL) {
192-
return CL_FALSE;
193-
}
194-
board_hal = acl_msim_get_system_definition(&builtin_prog_def_value);
195-
break;
196-
#endif
197173
default:
198174
// Not a valid setting so don't know which HAL to load
199175
return CL_FALSE;

src/acl_platform.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,6 @@ void acl_init_platform(void) {
390390
// offline device, if it exists
391391
break;
392392
case ACL_CONTEXT_MPSIM:
393-
#ifdef __linux__
394-
case ACL_CONTEXT_MSIM:
395-
#endif
396393
acl_platform.num_devices =
397394
acl_platform.initial_board_def
398395
->num_devices; // Simulator has its mmd, so it is loaded like an
@@ -660,10 +657,10 @@ static void l_initialize_devices(const acl_system_def_t *present_board_def,
660657
// shipped_board_def populated earlier in l_initialize_offline_devices
661658

662659
if (offline_mode == ACL_CONTEXT_OFFLINE_AND_AUTODISCOVERY ||
663-
offline_mode == ACL_CONTEXT_MSIM || offline_mode == ACL_CONTEXT_MPSIM) {
660+
offline_mode == ACL_CONTEXT_MPSIM) {
664661
unsigned int num_platform_devices = acl_platform.num_devices;
665662
if (!acl_platform.offline_device.empty() &&
666-
offline_mode != ACL_CONTEXT_MSIM && offline_mode != ACL_CONTEXT_MPSIM) {
663+
offline_mode != ACL_CONTEXT_MPSIM) {
667664
num_platform_devices -=
668665
1; // In this case there's an extra offline devices at the end of the
669666
// list. Do not check it.

0 commit comments

Comments
 (0)