当前位置:首页 > 报告详情

009--高一川.pdf

上传人: 山哈 编号:725258 2025-07-04 14页 588.08KB

1、RISC-V Summit China 2024Enabling Hardware Sampling Based PGO for RISC-V PlatformGao Yichuan()RISC-V Agile Design LabIntel Labs ChinaIntel ConfidentialDepartment or Event Name2RISC-V Summit China 20242PGO BasicsPGO(Profile-Guided Optimization)Use runtime feedback to improve software performanceSWPGO(

2、Instrumentation)Insert profiling code snippet to software Profiled data:Branch/Jump count/target Register/Memory values No hardware requirement High profiling overheadHWPGO(Sampling)Use hardware sample collect methods Profiled data:Performance Counter values Branch/Jump count/target(with LBR/CTR)Reg

3、ister/Memory values(not yet)Require PMU hardware support Low profiling overheadThis talkProfilingRun(Train)OptimizeSoftware vs Hardware PGOIntel ConfidentialDepartment or Event Name3RISC-V Summit China 20243RISC-V PMUPMU(Performance Monitoring Unit)Hardware unit for counting occurrence of uArch even

4、tsRISC-V PMU:provide fixed and event-based hpmcounters Software access via CSR interfaceIntel ConfidentialDepartment or Event Name4RISC-V Summit China 20244RISC-V PMU Extensions for HWPGO Latest PMU extensions Smcdeleg&SsccfgPMU counter delegation Smcntrpmf&SscofpmfCounter mode filtering and overflo

5、w interrupt Smctr&SsctrHart control transfer records(in next slide)Future extensions for precise event sampling,register value profiling,etc.Event-based samplingPMU config in S-modeControl flow info recording Base extensions(widely adopted)Zicntr&ZihpmProvide basic counters for PMU eventsRVA23Intel

6、ConfidentialDepartment or Event Name5RISC-V Summit China 20245RISC-V CTR for HWPGO Record control transfer history Jump instructions(including function calls and returns)Taken/not-taken branch instructions Traps,and trap returns Data is organized as circular buffer(FIFO)Source PC,Target PC Type,Cycl

word格式文档无特别注明外均可编辑修改,预览文件经过压缩,下载原文更清晰!
三个皮匠报告文库所有资源均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
本文主要内容是关于RISC-V平台硬件采样基于PGO(Profile-Guided Optimization)的探讨。关键点如下: 1. PGO技术:利用运行时反馈提高软件性能,分为软件PGO(SWPGO)和硬件PGO(HWPGO)。 2. RISC-V PMU:性能监测单元,提供固定和基于事件的计数器,支持硬件采样。 3. PMU扩展:介绍最新的PMU扩展,如Smcdeleg、Ssccfg等,用于精确事件采样和寄存器值分析。 4. 性能改进:通过硬件采样PGO,优化分支预测,使用RISC-V Zicond指令消除不可预测的分支指令。 5. 性能结果:在示例应用中,使用Zicond指令和PGO的RISC-V平台性能提升1.77倍,指令吞吐量提升2.13倍。 核心数据: - 性能计数器数据:循环缓冲区(FIFO)记录控制传输历史,如源PC、目标PC、类型、周期计数等。 - 性能统计:优化后的程序任务时钟时间为101149.07毫秒,指令吞吐量从1.34提升至2.86。 文章呼吁社区合作,推动RISC-V PGO技术的广泛应用和发展。
"RISC-V平台PGO技术如何提升性能?" "硬件采样PGO为RISC-V带来哪些新功能?" "如何借助Intel技术优化RISC-V软件?"
客服
商务合作
小程序
服务号
折叠