通过自适应线程调度,显著提升强化学习仿真推理的执行效率。
Hybrid-Adaptive Thread Tuning to Mitigate Simulation Execution Bottlenecks in High-Performance Reinforcement Learning Inference

- 结合物理先验神经算子与队列模型预测最优线程数。
- 动态负载下平均吞吐量达XGBoost的1.7倍、Reinforcer的1.8倍。
- 适合高动态性仿真环境中的RL推理系统优化使用。
在模拟闭环决策系统中,强化学习(RL)推理常受模拟器端执行开销制约,工作负载高度动态且对运行时线程配置敏感。现有多线程策略难以在执行前或期间匹配线程资源,导致资源竞争、调度开销和吞吐下降。通过实证分析,我们发现任务执行时间与调度时间之比是决定最优线程数的关键因素。基于此,提出AutoThread:一种混合自适应线程调优方法,用于缓解RL推理中的仿真瓶颈。AutoThread采用物理先验神经算子(PINO)作为线程数预测器,并引入有限源M/M/1排队模型约束与引导预测,实现动态工作负载下的快速精准估计。进一步通过负载感知在线微调补偿预测误差,优化资源分配。实验表明,相比静态策略,AutoThread平均提速18.4%;平均吞吐量分别达到XGBoost的1.7倍、Reinforcer的1.8倍;与最先进方法相比,执行时间最高降低83.8%。代码与数据集已公开于https://github.com/suchenjm/AutoThread。
原文摘要 · Abstract (English)
In simulation-in-the-loop decision-making systems, reinforcement learning (RL) inference is often constrained by simulator-side execution overhead, where workloads are highly dynamic and sensitive to runtime thread configurations. Existing multithreaded strategies struggle to match thread resources before or during execution, causing resource contention, scheduling overhead, and reduced throughput. Through empirical analysis, we identify the ratio of task execution time to scheduling time as the key factor determining the optimal thread count. Building on this insight, we propose AutoThread, a hybrid adaptive thread-tuning method for mitigating simulation bottlenecks in RL inference. AutoThread employs a Physics-Informed Neural Operator (PINO) as a thread-count predictor and incorporates a finite-source M/M/1 queueing model to constrain and guide prediction, enabling fast and accurate estimation under dynamic workloads. It further performs load-aware online fine-tuning to compensate for prediction errors and refine resource allocation. Experiments show that AutoThread improves average speedup by 18.4\% over static strategies, achieves average throughput of 1.7x and 1.8x that of XGBoost and Reinforcer, respectively, and reduces execution time by up to 83.8\% compared with state-of-the-art methods. Our code and dataset are publicly available at https://github.com/suchenjm/AutoThread.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。