• 首页
  • 期刊简介
  • 编委会
  • 投稿指南
  • 收录情况
  • 杂志订阅
  • 联系我们
引用本文:张建定,陈根浪,明宗禹.基于指令流水线的CUDA 核函数时间预测模型[J].软件工程,2024,27(10):74-78.【点击复制】
【打印本页】   【下载PDF全文】   【查看/发表评论】  【下载PDF阅读器】  
←前一篇|后一篇→ 过刊浏览
分享到: 微信 更多
基于指令流水线的CUDA 核函数时间预测模型
张建定, 陈根浪, 明宗禹
(浙江理工大学人工智能学院, 浙江 杭州 310018)
202130504207@mails.zstu.edu.cn; cgl@zju.edu.cn; 202220601008@mails.zstu.edu.cn
摘 要: 对CUDA核函数(CUDA Kernel Function)在静态下的评估预测是任务调度与程序优化的一个关键组成部分。文章通过对CUDA核函数的PTX(Parallel Thread Execution)进行代码分析和特性建模,精心设计了一个时间预测模型。该模型基于指令流水线的原理,可以在不执行程序的情况下,预测核函数在给定硬件环境下的执行时间。实验结果表明,该模型在预测CUDA核函数执行时间上的平均百分比误差为22.87%。这意味着该模型能够相对准确地预测核函数的执行时间,为任务调度系统提供参考,并辅助开发人员对程序进行优化。
关键词: CUDA;时间预测;静态;PTX;流水线
中图分类号: TP391    文献标识码: A
Time Prediction Model for CUDA Kernel Function Based on Instruction Pipeline
ZHANG Jianding, CHEN Genlang, MING Zongyu
(School of Arti f icial Intelligence, Zhejiang Sci-Tech University, Hangzhou 310018, China)
202130504207@mails.zstu.edu.cn; cgl@zju.edu.cn; 202220601008@mails.zstu.edu.cn
Abstract: Static evaluation and prediction of CUDA kernel functions are key components in task scheduling and program optimization. This paper proposes to carefully devise a time prediction model through the analysis of PTX (Parallel Thread Execution) code and feature modeling of CUDA kernel functions. Based on the principles of instruction pipeline, the model can predict the execution time of kernel functions in a given hardware environment without executing the program. Experimental results indicate that the model achieves an average percentage error of 22.87% in predicting the execution time of CUDA kernel functions. This means the model can relatively accurately predict the execution time of kernel functions, providing a reference for task scheduling systems and assisting developers in program optimization.
Keywords: CUDA; time prediction; static; PTX; pipeline


版权所有:软件工程杂志社
地址:辽宁省沈阳市浑南区新秀街2号 邮政编码:110179
电话:0411-84767887 传真:0411-84835089 Email:semagazine@neusoft.edu.cn
备案号:辽ICP备17007376号-1
技术支持:北京勤云科技发展有限公司

用微信扫一扫

用微信扫一扫