论文标题
Shenwei通用C/C ++的设计和实施
Design and Implementation of ShenWei Universal C/C++
论文作者
论文摘要
为多个尖端超级计算机提供动力的Shenwei多核系列处理器配备了其独特的片上异质体系结构。他们长期以来要求程序员为管理处理元素(MPE)编写单独的代码,并在计算处理元素(CPE)上加速部分,该部分类似于OpenCL之类的打开标准。这样的编程模型导致了破碎的代码和不良的可维护性,并且也很难迁移针对商品处理器的现有项目。借用CUDA和DPC ++的经验,并利用Shenwei多核体系结构上独特的统一主要内存,我们提出了Shenwei Universal C/C ++(SWUC),这是C/C ++的语言扩展,可以使MPE和CPE边界跨越流利的编程。通过使用多个新属性和编译器指令,用户能够在单个文件中编写在MPE和CPE上运行的代码。对于C ++,SWUC进一步支持CPE上的lambda表达式,使得代码流可以更好地匹配逻辑设计。 SWUC还设法使Athread Library界面可用,从而简化了原始Shenwei用户的学习曲线。这些功能强大的功能可确保SWUC简化Shenwei多核处理器的编程以及现有C/C ++应用程序的迁移。
The ShenWei many-core series processors powering multiple cutting-edge supercomputers are equipped with their unique on-chip heterogeneous architecture. They have long required programmers to write separate codes for the control part on Management Processing Element (MPE) and accelerated part on Compute Processing Element (CPE), which is similar to open standards like OpenCL. Such a programming model results in shattered code and bad maintainability, and also make it hard to migrate existing projects targeting commodity processors. Borrowing the experience from CUDA and DPC++ and leveraging the unique unified main memory on ShenWei many-core architecture, we propose ShenWei Universal C/C++ (SWUC), a language extension to C/C++ that enables fluent programming acrossing the boundary of MPE and CPE. Through the use of several new attributes and compiler directives, users are able to write codes running on MPE and CPE in a single file. In case of C++, SWUC further support lambda expressions on CPEs, making it possible to have the code flow better matching the logical design. SWUC also manages to make the Athread library interfaces available, easing the learning curve for original ShenWei users. These powerful features together ensures SWUC to simplify the programming on ShenWei many-core processors and migration of existing C/C++ applications.