force selected pipeline stages in throughput mode
Validate Operations / validate-operations (push) Has been cancelled

increase throughput scheduler budget
add experimental throughput auto mode
This commit is contained in:
NiccoloN
2026-11-02 12:08:33 +01:00
parent 4168b588fa
commit 4a1fe710b2
35 changed files with 2047 additions and 398 deletions
+32
View File
@@ -1,3 +1,5 @@
import argparse
import json
import re
import shlex
import shutil
@@ -20,6 +22,29 @@ PIM_PASS_LABEL_BY_SUFFIX = dict(PIM_PASS_LABELS)
TIMING_LINE_RE = re.compile(r"^\s*([0-9]+\.[0-9]+)\s+\(\s*[0-9.]+%\)\s+(.+?)\s*$")
def parse_pipeline_depth(value):
if value == "auto":
return value
try:
depth = int(value)
except ValueError:
raise argparse.ArgumentTypeError("pipeline must be a positive integer or auto") from None
if depth < 1:
raise argparse.ArgumentTypeError("pipeline must be a positive integer or auto")
return depth
def pipeline_sort_key(value):
return (str(value) == "auto", 0 if str(value) == "auto" else int(value))
def read_selected_pipeline_depth(pim_dir):
if pim_dir is None:
return None
report = Path(pim_dir).parent / "reports/pipeline_selection.json"
return json.loads(report.read_text()).get("selected_depth") if report.exists() else None
def _parse_pim_pass_timings(output_text):
pass_timings = {}
for line in output_text.splitlines():
@@ -79,6 +104,13 @@ def compile_with_raptor(network_path, raptor_onnx_path: Path, output_base: Path,
capture_output=True,
timeout_sec=timeout_sec,
)
selected_depth = read_selected_pipeline_depth(pim_dir)
if selected_depth is not None:
message = f"Selected pipeline depth: {selected_depth}"
if reporter is not None:
reporter.log(message)
else:
print(message)
if reporter is None:
print(Fore.GREEN + "Raptor execution successful" + Style.RESET_ALL)
return _parse_pim_pass_timings(output_text)