rework actually broken dcp merge + compute re-batching (still to refine)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import shlex
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -11,12 +10,6 @@ from validate_one import ProgressReporter, clean_workspace_artifacts, validate_n
|
||||
from raptor import PIM_PASS_LABELS
|
||||
|
||||
|
||||
def format_command(cmd):
|
||||
if isinstance(cmd, (list, tuple)):
|
||||
return shlex.join(str(arg) for arg in cmd)
|
||||
return str(cmd)
|
||||
|
||||
|
||||
def format_return_status(returncode):
|
||||
if returncode < 0:
|
||||
signal_num = -returncode
|
||||
@@ -34,8 +27,6 @@ def print_validation_error(reporter, rel, exc):
|
||||
file=sys.stderr, flush=True)
|
||||
if isinstance(exc, subprocess.CalledProcessError):
|
||||
print(format_return_status(exc.returncode), file=sys.stderr, flush=True)
|
||||
print("Retry command:", file=sys.stderr, flush=True)
|
||||
print(format_command(exc.cmd), file=sys.stderr, flush=True)
|
||||
else:
|
||||
print(f"{type(exc).__name__}: {exc}", file=sys.stderr, flush=True)
|
||||
print("=" * 72, file=sys.stderr, flush=True)
|
||||
@@ -65,6 +56,8 @@ def main():
|
||||
ap.add_argument("--threshold", type=float, default=1e-3, help="Max allowed diff per output element.")
|
||||
ap.add_argument("--crossbar-size", type=int, default=64)
|
||||
ap.add_argument("--crossbar-count", type=int, default=8)
|
||||
ap.add_argument("--core-count", type=int, default=None,
|
||||
help="Core count to pass to Raptor. If omitted, Raptor uses its default.")
|
||||
ap.add_argument("--clean", action="store_true",
|
||||
help="Remove generated validation artifacts under each model workspace and exit.")
|
||||
a = ap.parse_args()
|
||||
@@ -114,7 +107,7 @@ def main():
|
||||
try:
|
||||
result = validate_network(
|
||||
onnx_path, a.raptor_path, a.onnx_include_dir, simulator_dir,
|
||||
crossbar_size=a.crossbar_size, crossbar_count=a.crossbar_count,
|
||||
crossbar_size=a.crossbar_size, crossbar_count=a.crossbar_count, core_count=a.core_count,
|
||||
threshold=a.threshold,
|
||||
reporter=reporter,
|
||||
model_index=index,
|
||||
|
||||
Reference in New Issue
Block a user