bench 85ae1750f1 Salty 容器里 onnxruntime 线程数限到分给容器的核数(阶段和 bench dev 都生效)
容器看得到宿主 244 个核,配额只有 4–6 个;onnxruntime 默认按核数开 125 个线程。
10-15 容器实测 resnet50(4 核):默认 320–500 ms/次,限到 4 线程 22 ms;hmct 校准写死的 10 线程约 35–48 ms。
做法:worker 把 harness/container_site 放到 PYTHONPATH 最前,其中 sitecustomize 在 onnxruntime 第一次 import 时
给 InferenceSession 加上限(OMP_NUM_THREADS),不用 onnxruntime 的进程什么都不做。它盖掉的镜像自带
sitecustomize 只装 Ubuntu 的 apport 崩溃钩子。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:28:35 +08:00
..