Judging a type by its pointer: optimizing GPU virtual functions

Judging a type by its pointer: optimizing GPU virtual functions
复制标题

通过指针判断类型:优化GPU虚拟函数

DOI:
10.1145/3445814.3446734
复制
发表时间:
2021
期刊:
ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’21
影响因子:
--
通讯作者:
Rogers, Timothy G.
Rogers, Timothy G.
中科院分区:
--
文献类型:
--
作者:
Zhang, Mengchi;Alawneh, Ahmad;Rogers, Timothy G.

文献摘要

参考文献

相似文献

可编程加速器旨在提供传统CPU的灵活性,并显著提高性能。广泛采用可编程加速器(如GPU)的一个众所周知的障碍是移植代码所涉及的软件工程开销。在GPU上对C++的现有支持允许程序员很轻松地移植多态代码。为了减少虚函数的性能开销,提出了两种新的技术,它们只根据对象的地址来确定对象的类型,而不访问对象的嵌入式虚表指针。第一种技术是协调对象分配和函数查找(COUE),这是一个纯软件解决方案,它按类型分配对象,并使用编译器和运行时来查找对象的vTable,而无需访问嵌入的指针。相比当代的CUDA、先前的研究和我们新提出的基于类型的分配器,Coal分别将性能提高了80%、47%和6%。第二个解决方案TypePointerTM引入了硬件修改,允许对象指针中未使用的位对对象类型进行编码,与CUDA、以前的工作和我们的新分配器相比,性能分别提高了90%、56%和12%。TypePointer还可以与默认的CUDA分配器一起使用,在不修改对象分配的情况下实现18%的性能改进。
Programmable accelerators aim to provide the flexibility of traditional CPUs with significantly improved performance. A well-known impediment to the widespread adoption of programmable accelerators, like GPUs, is the software engineering overhead involved in porting the code. Existing support for C++ on GPUs allows programmers to port polymorphic code with little effort. However, the overhead from the virtual functions introduced by polymorphic code has not been well studied or mitigated on GPUs.To alleviate the performance cost of virtual functions, we propose two novel techniques that determine an object’s type based only on the object’s address, without accessing the object’s embedded virtual table pointer. The first technique, Coordinated Object Allocation and function Lookup (COAL), is a software-only solution that allocates objects by type and uses the compiler and runtime to find the object’s vTable without accessing an embedded pointer. COAL improves performance by 80%, 47%, and 6% over contemporary CUDA, prior research, and our newly-proposed type-based allocator, respectively. The second solution, TypePointer, introduces a hardware modification that allows unused bits in the object pointer to encode the object’s type, improving performance by 90%, 56%, and 12% over CUDA, prior work, and our new allocator. TypePointer can also be used with the default CUDA allocator to achieve an 18% performance improvement without modifying object allocation.
VPC预测:通过基于硬件的动态去虚拟化降低间接分支的成本
DOI: --
发表时间: 2007
期刊: International Symposium on Computer Architecture
影响因子: --
作者:
Hyesoon Kim;José A. Joao;O. Mutlu;Chang Joo Lee;Y. Patt;R. Cohn
通讯作者: R. Cohn
通过间接跳转的动态预测提高面向对象语言的性能
DOI: 10.1145/1346281.1346293
发表时间: 2008
期刊: IEEE International Symposium on Performance Analysis of Systems and Software, 2005. ISPASS 2005.
影响因子: --
作者:
José A. Joao;O. Mutlu;Hyesoon Kim;Rishi Agarwal;Y. Patt
通讯作者: Y. Patt
通过运行时类型反馈优化动态分派的调用
DOI: 10.1145/178243.178478
发表时间: 1994
期刊: SocioEconomic Challenges
影响因子: --
作者:
Urs Hölzle;D. Ungar
通讯作者: D. Ungar
静态类型语言中的动态类型
DOI: --
发表时间: 1989
期刊: ACM-SIGACT Symposium on Principles of Programming Languages
影响因子: --
作者:
M. Abadi;L. Cardelli;B. Pierce;G. Plotkin
通讯作者: G. Plotkin
面向吞吐量的 GPU 内存分配
DOI: --
发表时间: 2019
期刊: ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming
影响因子: --
作者:
Isaac Gelado;M. Garland
通讯作者: M. Garland