Ver código fonte

Write initial temperatures to the JIT success log

jonathanvdc 8 anos atrás
pai
commit
9a90c1c868
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      kernel/modelverse_jit/jit.py

+ 3 - 1
kernel/modelverse_jit/jit.py

@@ -849,7 +849,9 @@ def compile_function_body_adaptive(
 
     body_bytecode, = yield [("CALL_ARGS", [jit.jit_parse_bytecode, (body_id,)])]
     initial_temperature, increment_temperature = temperature_heuristic(body_bytecode)
-    print('Initial temperature for %s: %d' % (function_name, initial_temperature))
+    if jit.jit_success_log_function is not None:
+        jit.jit_success_log_function(
+            'Initial temperature for %s: %d' % (function_name, initial_temperature))
 
     if initial_temperature >= ADAPTIVE_FAST_JIT_TEMPERATURE_THRESHOLD:
         # Initial temperature exceeds the fast-jit threshold.