[feat] Mark task as parallel when GridScheduler is enabled. This changes enables parallel FPGA kernels.
@@ -185,7 +185,13 @@ public class OCLCompiler {
emitFrontEnd(r.providers, r.backend, r.installedCodeOwner, r.args, r.meta, r.graph, r.graphBuilderSuite, r.optimisticOpts, r.profilingInfo, r.suites, r.isKernel, r.buildGraph,
r.batchThreads);
boolean isParallel = false;
- if (r.meta != null && r.meta.isParallel()) {
+ /**
+ * A task is determined as parallel if: (i) it has loops annotated with
+ * {@link uk.ac.manchester.tornado.api.annotations.Parallel} which corresponds
+ * to use a domain with depth greater than zero, or (ii) it uses the
+ * GridScheduler.
+ */
+ if (r.meta != null && (r.meta.isParallel() || r.meta.isGridSchedulerEnabled())) {
isParallel = true;
}
emitBackEnd(r.graph, null, r.installedCodeOwner, r.backend, r.compilationResult, r.factory, null, r.lirSuites, r.isKernel, isParallel);
