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.
翻译:支持多端尖端超级计算机的沈怀多级系列处理器配备了独特的芯片多元结构,长期需要程序员为管理处理元素控制部分(MPE)编写单独的代码,并加快计算元素(CPE)的代码,这与开放标准类似,如OpenCL。这样的编程模式导致代码破碎,维护性差,并使现有项目很难迁移到商品处理器。借用CUDA和DPC++的经验,利用沈伟多核心结构上独特的统一主记忆,我们建议SenWei Universal C/C++(SWUC),这是C/C++(SW)的一个语言扩展,使流畅编程能够跨越MPE和CPE的边界。通过使用一些新的属性和编程指令,用户能够以单一文件的形式编写运行在MPE和CPE的代码。在C++中,SUC进一步支持C+的羊肉酱表达方式,使代码能够更符合逻辑设计,我们建议SWE Un Universal Un 的原始设计。 She-C 管理这些强大的应用程序,并简化了She-comlist commliferal Instelational listemissional