[ENHANCE] now binaries are loaded after sketching
@@ -156,9 +156,6 @@ public class OCLDeviceMapping implements TornadoDevice {
final ResolvedJavaMethod resolvedMethod = getTornadoRuntime()
.resolveMethod(executable.getMethod());
- if (deviceContext.isCached(resolvedMethod.getName())) {
- return deviceContext.getCode(resolvedMethod.getName());
- }
// final long t1 = System.nanoTime();
final Sketch sketch = TornadoSketcher.lookup(resolvedMethod);
@@ -166,6 +163,10 @@ public class OCLDeviceMapping implements TornadoDevice {
sketch, task.getArguments(), task.meta(),
(OCLProviders) getBackend().getProviders(), getBackend());
+ if (deviceContext.isCached(resolvedMethod.getName())) {
+ return deviceContext.getCode(resolvedMethod.getName());
+ }
+
if (SHOW_OPENCL) {
String filename = getFile(executable.getMethodName());
// Tornado.info("Generated code for device %s - %s\n",
