Skip to content

Commit 67c8238

Browse files
committed
Remove CL_CONTEXT_COMPILER_MODE_SIMULATION_INTELFPGA
This compiler mode (simulation mode, mode 6) is unused by the runtime and hence safe to remove. I am removing it so that the differences between simulation devices and hardware devices are removed as much as possible, this is part of the effort of https://github.com/sophimao/applications.fpga.oneapi.products.acl-docs/blob/sim-auto-select/FDs/usability/hld_usability_simulation_device_auto_selection_fd.md When we search for the compiler mode on Google, nothing returned, so it's also not documented anywhere. Tests Done: Runtime Unit Tests Checked that products/regtest/hld does not have lines like "compiler_mode => 6" or "compiler_mode => '6'"
1 parent dd7c2cd commit 67c8238

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

include/acl_types.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ typedef cl_ulong acl_object_magic_t;
198198
// scenario during runtime.
199199
#define CL_CONTEXT_COMPILER_MODE_ONLINE_INTELFPGA 4
200200
#define CL_CONTEXT_COMPILER_MODE_SPLIT_KERNEL_INTELFPGA 5
201-
#define CL_CONTEXT_COMPILER_MODE_SIMULATION_INTELFPGA 6
202-
#define CL_CONTEXT_COMPILER_MODE_NUM_MODES_INTELFPGA 7
201+
#define CL_CONTEXT_COMPILER_MODE_NUM_MODES_INTELFPGA 6
203202

204203
typedef enum {
205204
ACL_COMPILER_MODE_OFFLINE = CL_CONTEXT_COMPILER_MODE_OFFLINE_INTELFPGA,
@@ -212,7 +211,6 @@ typedef enum {
212211
ACL_COMPILER_MODE_ONLINE = CL_CONTEXT_COMPILER_MODE_ONLINE_INTELFPGA,
213212
ACL_COMPILER_MODE_SPLIT_KERNEL =
214213
CL_CONTEXT_COMPILER_MODE_SPLIT_KERNEL_INTELFPGA,
215-
ACL_COMPILER_MODE_SIMULATION = CL_CONTEXT_COMPILER_MODE_SIMULATION_INTELFPGA,
216214
ACL_COMPILER_MODE_NUM_MODES = CL_CONTEXT_COMPILER_MODE_NUM_MODES_INTELFPGA
217215
} acl_compiler_mode_t;
218216

src/acl_program.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ static cl_int l_build_program_for_device(cl_program program,
13501350
}
13511351
// num_global_mem_systems of device binary autodiscovery def will remain 0
13521352
// only when CL_CONTEXT_COMPILER_MODE_INTELFPGA is
1353-
// ACL_COMPILER_MODE_PRELOADED_BINARY_ONLY or ACL_COMPILER_MODE_SIMULATION,
1353+
// ACL_COMPILER_MODE_PRELOADED_BINARY_ONLY,
13541354
// in these situations we should only use num_global_memory_system of device
13551355
// autodiscovery def which would be initialized with acl_kernel_if_init by
13561356
// reading the autodiscovery string of the bitstream currently programmed on

test/acl_context_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ MT_TEST(Context, compiler_mode) {
948948
{"x", false, false}, {"x1", false, false}, {"-1", false, false},
949949
{"0", true, true}, {"1", true, true}, {"2", true, true},
950950
{"3", true, true}, {"4", true, true}, {"5", true, true},
951-
{"6", true, true}, {"7", true, false}};
951+
{"6", true, false}};
952952

953953
for (unsigned ienv = 0; ienv < sizeof(envvals) / sizeof(envvals[0]); ienv++) {
954954
// don't set env vars until all threads are ready to use it

0 commit comments

Comments
 (0)