Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Commit 6490fc1

Browse files
authored
allow changing of target device (CPU or FPGA) during the same run (#24)
allow changing of target device (CPU or FPGA) inside the same run
1 parent 9c3534a commit 6490fc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

host/src/fpga_int.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static DEV_TYPE get_device() {
6363
return d;
6464
}
6565

66-
static int g_choice = get_device();
66+
static int g_choice = FPGA;
6767

6868
// DYADIC_MULTIPLY section
6969
static uint64_t get_coeff_size() {
@@ -141,6 +141,7 @@ static Buffer fpga_buffer(g_fpga_bufsize, g_batch_size_dyadic_mult,
141141
g_batch_size_KeySwitch);
142142

143143
void attach_fpga_pooling() {
144+
g_choice = get_device();
144145
if (g_choice == CPU) {
145146
return;
146147
}

0 commit comments

Comments
 (0)