xnn.common.benchmark.runner.run_parallel#
- xnn.common.benchmark.runner.run_parallel(raw, workers=None)[source]#
Score the models of a benchmark concurrently, one worker process per model.
The in-node counterpart of a Slurm job array: the effective config is written to
<output.dir>/parts/config.yaml, andxnn benchmark --models <label>is spawned for each entry, at mostworkersat a time. With GPUs available each worker is pinned to one of them throughCUDA_VISIBLE_DEVICES(workerktakes thek-th visible GPU, cycling), so the default of one worker per GPU scores the models in parallel without sharing devices. Each worker’s output goes toparts/<label>.log. When all workers have finished the parts are merged into the final table withmerge_parts().- Parameters:
- Returns:
The merged rows, in config order.
- Return type:
- Raises:
ValueError – If run inside a distributed launch (the two fan-outs are exclusive at this level; combine them through a job array instead), or if no worker count can be inferred.
RuntimeError – If any worker fails; the message names its log file.