[FIX] OCLInstalledCode.execute() does not rely on events outside OOO mode
@@ -92,11 +92,18 @@ public class OCLInstalledCode extends InstalledCode implements TornadoInstalledC
}
final int task = stack.enqueueRead(internalEvents);
- final Event event = deviceContext.resolveEvent(task);
+
+ Event event = null;
+ if (ENABLE_OOO_EXECUTION || VM_USE_DEPS) {
+ event = deviceContext.resolveEvent(task);
event.waitOn();
+ } else {
+ deviceContext.sync();
+ }
debug("kernel completed: id=0x%x, method = %s, device = %s", kernel.getId(),
kernel.getName(), deviceContext.getDevice().getName());
+ if (event != null) {
debug("\tstatus : %s", event.getStatus());
if (meta != null && meta.enableProfiling()) {
@@ -104,6 +111,7 @@ public class OCLInstalledCode extends InstalledCode implements TornadoInstalledC
debug("\ttotal : %f seconds", event.getTotalTime());
}
}
+ }
public void execute(final OCLCallStack stack) {
execute(stack, null);
