disable profiling trace by default
This commit is contained in:
@@ -43,14 +43,14 @@ logger = init_logger(__name__)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Profiling debug prints (locate where startup hangs after weight load).
|
||||
# Gate on PROF_TRACE=1 (default on, since we are diagnosing a startup hang).
|
||||
# Each print flushes; grep "[PROF]" in the server log.
|
||||
# Profiling debug prints. Disabled by default for benchmark runs because each
|
||||
# print flushes and decode emits many per-token layer events. Enable only with
|
||||
# PROF_TRACE=1 when collecting code-level traces.
|
||||
# ---------------------------------------------------------------------------
|
||||
import os as _os_prof
|
||||
import sys as _sys_prof
|
||||
import time as _time_prof
|
||||
_PROF_TRACE = _os_prof.environ.get("PROF_TRACE", "1") != "0"
|
||||
_PROF_TRACE = _os_prof.environ.get("PROF_TRACE", "0") == "1"
|
||||
_t0 = _time_prof.time()
|
||||
def _prof(msg):
|
||||
if _PROF_TRACE:
|
||||
|
||||
Reference in New Issue
Block a user