Stabilize first-run cudagraph timing and colorize terminal output
- _cudagraph_plugin: warm up autotune/JIT explicitly before graph capture (internal 5-iter warmup is too short), tag fallback markers with the failing phase; first-run latency no longer jitters run-to-run. - _device_guard_plugin (new): set GEMS_VENDOR via torch probe before importing flag_gems, avoiding its timeout-less nvidia-smi subprocess probe that can hang import in fork-broken environments. - _pretty_report_plugin (new) + _term_style (new): fold inputs identical across all result rows into a legend line, color status/plugin tags/markers on the live terminal; run.log is ANSI-stripped and keeps upstream SUCCESS/column wording for grep compatibility. - run_pytest.sh: make USE_FLAGTUNE overridable, group all knobs into a config section with Chinese comments, add start/end banners. - README: document the warmup semantics, new plugins/env vars, and the A/B rule that both sides must use the same USE_FLAGTUNE.
This commit is contained in:
@@ -31,7 +31,9 @@ def _load_yaml(path: str) -> dict:
|
||||
with open(path, "r") as f:
|
||||
return _yaml.safe_load(f) or {}
|
||||
except Exception as exc:
|
||||
print(f"[shape-iter-inject-plugin] failed to load {path}: {exc}", file=sys.stderr)
|
||||
from _term_style import tag
|
||||
print(f"{tag('[shape-iter-inject-plugin]')} failed to load {path}: {exc}",
|
||||
file=sys.stderr)
|
||||
return {}
|
||||
|
||||
|
||||
@@ -95,6 +97,7 @@ def pytest_collection_finish(session):
|
||||
cls.get_input_iter = _make_patched(own)
|
||||
patched += 1
|
||||
|
||||
print(f"[shape-iter-inject-plugin] get_input_iter redirected on {patched} "
|
||||
from _term_style import tag
|
||||
print(f"{tag('[shape-iter-inject-plugin]')} get_input_iter redirected on {patched} "
|
||||
f"hardcoded-shape Benchmark classes; yaml shapes now win",
|
||||
file=sys.stderr, flush=True)
|
||||
|
||||
Reference in New Issue
Block a user