Browse Source

Wire up the JIT's compiled_function_lookup member in the kernel

jonathanvdc 8 years ago
parent
commit
a03d9129a6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      kernel/modelverse_kernel/main.py

+ 4 - 0
kernel/modelverse_kernel/main.py

@@ -20,6 +20,10 @@ class ModelverseKernel(object):
 
 
         # `self.jit` handles most JIT-related functionality.
         # `self.jit` handles most JIT-related functionality.
         self.jit = jit.ModelverseJit()
         self.jit = jit.ModelverseJit()
+        if self.allow_compiled:
+            self.jit.compiled_function_lookup = lambda func_name: \
+                getattr(compiled_functions, func_name, None)
+
         # To disable the JIT, uncomment the line below:
         # To disable the JIT, uncomment the line below:
         #     self.jit.set_jit_enabled(False)
         #     self.jit.set_jit_enabled(False)
         self.debug_info = "(no debug information found)"
         self.debug_info = "(no debug information found)"