[fix] Replace user-defined flag in the FPGA pre-compilation stage
@@ -374,7 +374,6 @@ public class TornadoTaskSchedule implements AbstractTaskGraph {
*/
private void preCompilationForFPGA() {
boolean compile = false;
- if (Tornado.ACCELERATOR_IS_FPGA) {
if (Tornado.FPGA_EMULATION) {
compile = true;
} else if (graphContext.getDeviceFirtTask() instanceof TornadoAcceleratorDevice) {
@@ -383,7 +382,6 @@ public class TornadoTaskSchedule implements AbstractTaskGraph {
compile = true;
}
}
- }
if (compile) {
if (Tornado.DEBUG) {
@@ -414,7 +412,8 @@ public class TornadoTaskSchedule implements AbstractTaskGraph {
@Override
public void scheduleInner() {
boolean compile = compileToTornadoVMBytecodes();
- if (compile) {
+ TornadoAcceleratorDevice deviceForTask = graphContext.getDeviceForTask(0);
+ if (compile && deviceForTask.getDeviceContext().isPlatformFPGA()) {
preCompilationForFPGA();
}
