kernel_slicer:基于GPU编程API的高级方法

V. Frolov, V. Sanzharov, V. Galaktionov
{"title":"kernel_slicer:基于GPU编程API的高级方法","authors":"V. Frolov, V. Sanzharov, V. Galaktionov","doi":"10.1109/ISPRAS57371.2022.10076850","DOIUrl":null,"url":null,"abstract":"We present a cross-platform approach to development of high performance software for both CPUs (via ISPC) and GPUs (via Vulkan) using a subset of common C++. An important difference of our technology with existing solutions is that we do not introduce any new language constructs or directives for parallel processing in to the language. Opposite to that we restrict language capabilities with a specific programming patterns and library calls thus making “clean code” also the high performance one. Unlike many other programming technologies, our solution doesn’t make projects using it dependent on it: (1) the input code is a normal C++ code which can be processed with any existing C++11 compiler and also can use any directive-based technologies inside (for example, OpenMP); (2) the output code is a readable implementation of the same algorithm in ISPC or Vulkan which is intended to be worked with by replacing different virtual functions and kernels if needed. As a result, this approach has an important advantage over existing ones: even if we have a limited hardware support in our translator, user is not limited by these features. This is because optimizations could be manually added to the generated code, and our approach assumes user will do this in such a way that code re-generation will not break them. Therefore, we position our system as help for developers who need deep performance control and understanding (via careful analysis of the low level code) which usually forces them to use Vulkan on a GPU or ISPC on a CPU. Our translator takes a C++ class as input and generates output implementation as a derived class using source-to-source transformation via clang front-end. Therefore the generated code is trivially integrated with existing codebase by just replacing class pointer with the generated implementation. Finally, unlike many other solutions, our technology is not a black box for a user and also makes debugging transparent because it is easy to distinguish translator errors from the user’s errors.","PeriodicalId":103880,"journal":{"name":"2022 Ivannikov Ispras Open Conference (ISPRAS)","volume":"16 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"kernel_slicer: high-level approach on top of GPU programming API\",\"authors\":\"V. Frolov, V. Sanzharov, V. Galaktionov\",\"doi\":\"10.1109/ISPRAS57371.2022.10076850\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present a cross-platform approach to development of high performance software for both CPUs (via ISPC) and GPUs (via Vulkan) using a subset of common C++. An important difference of our technology with existing solutions is that we do not introduce any new language constructs or directives for parallel processing in to the language. Opposite to that we restrict language capabilities with a specific programming patterns and library calls thus making “clean code” also the high performance one. Unlike many other programming technologies, our solution doesn’t make projects using it dependent on it: (1) the input code is a normal C++ code which can be processed with any existing C++11 compiler and also can use any directive-based technologies inside (for example, OpenMP); (2) the output code is a readable implementation of the same algorithm in ISPC or Vulkan which is intended to be worked with by replacing different virtual functions and kernels if needed. As a result, this approach has an important advantage over existing ones: even if we have a limited hardware support in our translator, user is not limited by these features. This is because optimizations could be manually added to the generated code, and our approach assumes user will do this in such a way that code re-generation will not break them. Therefore, we position our system as help for developers who need deep performance control and understanding (via careful analysis of the low level code) which usually forces them to use Vulkan on a GPU or ISPC on a CPU. Our translator takes a C++ class as input and generates output implementation as a derived class using source-to-source transformation via clang front-end. Therefore the generated code is trivially integrated with existing codebase by just replacing class pointer with the generated implementation. Finally, unlike many other solutions, our technology is not a black box for a user and also makes debugging transparent because it is easy to distinguish translator errors from the user’s errors.\",\"PeriodicalId\":103880,\"journal\":{\"name\":\"2022 Ivannikov Ispras Open Conference (ISPRAS)\",\"volume\":\"16 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-12-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 Ivannikov Ispras Open Conference (ISPRAS)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ISPRAS57371.2022.10076850\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 Ivannikov Ispras Open Conference (ISPRAS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISPRAS57371.2022.10076850","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

我们提出了一个跨平台的方法来开发高性能软件的cpu(通过ISPC)和gpu(通过Vulkan)使用一个子集的通用c++。我们的技术与现有解决方案的一个重要区别是,我们没有在语言中引入任何新的语言结构或并行处理指令。与此相反,我们用特定的编程模式和库调用来限制语言的能力,从而使“干净的代码”也成为高性能的代码。与许多其他编程技术不同,我们的解决方案不会使使用它的项目依赖于它:(1)输入代码是普通的c++代码,可以用任何现有的c++ 11编译器处理,也可以使用任何基于指令的技术(例如OpenMP);(2)输出代码是ISPC或Vulkan中相同算法的可读实现,目的是在需要时通过替换不同的虚拟函数和内核来工作。因此,这种方法比现有的方法有一个重要的优势:即使我们的翻译器中有有限的硬件支持,用户也不会受到这些功能的限制。这是因为可以手动将优化添加到生成的代码中,并且我们的方法假设用户将以这样一种方式进行优化,即代码重新生成不会破坏它们。因此,我们将我们的系统定位为帮助那些需要深入的性能控制和理解(通过仔细分析底层代码)的开发人员,这通常迫使他们在GPU或CPU上使用Vulkan。我们的转换器接受一个c++类作为输入,并通过clang前端使用源到源转换作为派生类生成输出实现。因此,只需用生成的实现替换类指针,生成的代码就可以轻松地与现有代码库集成。最后,与许多其他解决方案不同的是,我们的技术对用户来说不是一个黑盒子,而且由于很容易区分翻译人员的错误和用户的错误,我们的技术也使调试变得透明。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
kernel_slicer: high-level approach on top of GPU programming API
We present a cross-platform approach to development of high performance software for both CPUs (via ISPC) and GPUs (via Vulkan) using a subset of common C++. An important difference of our technology with existing solutions is that we do not introduce any new language constructs or directives for parallel processing in to the language. Opposite to that we restrict language capabilities with a specific programming patterns and library calls thus making “clean code” also the high performance one. Unlike many other programming technologies, our solution doesn’t make projects using it dependent on it: (1) the input code is a normal C++ code which can be processed with any existing C++11 compiler and also can use any directive-based technologies inside (for example, OpenMP); (2) the output code is a readable implementation of the same algorithm in ISPC or Vulkan which is intended to be worked with by replacing different virtual functions and kernels if needed. As a result, this approach has an important advantage over existing ones: even if we have a limited hardware support in our translator, user is not limited by these features. This is because optimizations could be manually added to the generated code, and our approach assumes user will do this in such a way that code re-generation will not break them. Therefore, we position our system as help for developers who need deep performance control and understanding (via careful analysis of the low level code) which usually forces them to use Vulkan on a GPU or ISPC on a CPU. Our translator takes a C++ class as input and generates output implementation as a derived class using source-to-source transformation via clang front-end. Therefore the generated code is trivially integrated with existing codebase by just replacing class pointer with the generated implementation. Finally, unlike many other solutions, our technology is not a black box for a user and also makes debugging transparent because it is easy to distinguish translator errors from the user’s errors.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书