DynaSOAr:一个面向对象的GPU并行内存分配器
DynaSOAr: A Parallel Memory Allocator for Object-oriented Programming on GPUs with Efficient Memory Access
摘要:
长期以来,面向对象编程被认为对于SIMD高性能计算来说效率太低,尽管许多重要的HPC应用程序都具有固有的对象结构。在SIMD加速器(包括GPU)上,这主要是由于内存分配和内存访问的性能问题:有一些库直接在加速器设备上支持并行内存分配,但所有这些库都受到未合并内存访问的影响。我们发现了一类广泛的面向对象的程序,许多重要的现实世界的应用程序,可以有效地实现大规模并行SIMD加速器。我们称这个类为单方法多对象(SMMO),因为并行性是通过在一个类型的所有对象上运行一个方法来表达的。为了让普通程序员能够快速进行GPU编程,我们开发了DynaSOAr,这是一个用于SMMO应用程序的CUDA框架。DynaSOAr由(1)完全并行、无锁、动态内存分配器,(2)数据布局DSL和(3)高效、并行的do-all操作组成。DynaSOAr通过控制内存分配和内存访问,实现了优于最先进的GPU内存分配器的性能。DynaSOAr通过阵列结构数据布局提高了已分配内存的使用率,并通过无锁分层位图有效管理空闲和已分配内存块来实现低内存碎片。与其他分配器相反,我们的设计在很大程度上基于原子操作,以原始(去)分配性能换取更好的整体应用程序性能。在我们的基准测试中,DynaSOAr在最先进的分配器上实现了高达3倍的应用程序代码加速。此外,DynaSOAr比其他分配器更有效地管理堆内存,允许程序员在相同内存量的情况下运行高达2倍的问题大小。
英文摘要:
Object-oriented programming has long been regarded as too inefficient for SIMD high-performance computing, despite the fact that many important HPC applications have an inherent object structure. On SIMD accelerators, including GPUs, this is mainly due to performance problems with memory allocation and memory access: There are a few libraries that support parallel memory allocation directly on accelerator devices, but all of them suffer from uncoalesed memory accesses. We discovered a broad class of object-oriented programs with many important real-world applications that can be implemented efficiently on massively parallel SIMD accelerators. We call this class Single-Method Multiple-Objects (SMMO), because parallelism is expressed by running a method on all objects of a type. To make fast GPU programming available to average programmers, we developed DynaSOAr, a CUDA framework for SMMO applications. DynaSOAr consists of (1) a fully-parallel, lock-free, dynamic memory allocator, (2) a data layout DSL and (3) an efficient, parallel do-all operation. DynaSOAr achieves performance superior to state-of-the-art GPU memory allocators by controlling both memory allocation and memory access. DynaSOAr improves the usage of allocated memory with a Structure of Arrays data layout and achieves low memory fragmentation through efficient management of free and allocated memory blocks with lock-free, hierarchical bitmaps. Contrary to other allocators, our design is heavily based on atomic operations, trading raw (de)allocation performance for better overall application performance. In our benchmarks, DynaSOAr achieves a speedup of application code of up to 3x over state-of-the-art allocators. Moreover, DynaSOAr manages heap memory more efficiently than other allocators, allowing programmers to run up to 2x larger problem sizes with the same amount of memory.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。