CuTe布局的范畴基础
Categorical Foundations for CuTe Layouts
AI总结:
本文提出一个范畴框架,用于理解和实现CuTe布局代数,通过定义Tuple和Nest范畴及其态射操作,提供与CUTLASS行为一致的Python实现。
摘要:
NVIDIA的CUTLASS库提供了一套强大的方法,用于描述和操作GPU上的多维张量数据。这些方法在抽象的CuTe布局概念和丰富的布局代数基础上进行概念性地建立,包括组合、逻辑积和逻辑除法等操作。在本文中,我们通过关注一类自然出现的可处理布局,提出一个范畴框架来理解这种布局代数。为此,我们定义了两个范畴Tuple和Nest,其态射产生布局。我们定义了在这些范畴中态射上的一系列操作,并证明了这些操作与相应布局操作的兼容性。此外,我们还给出了由我们的构造产生的所有布局的完整特征化。最后,我们提供了我们的范畴构造的Python实现,以及测试,以展示与CUTLASS行为的一致性。此实现可在我们的git仓库中找到:https://github.com/ColfaxResearch/layout-categories。
英文摘要:
NVIDIA's CUTLASS library provides a robust and expressive set of methods for describing and manipulating multi-dimensional tensor data on the GPU. These methods are conceptually grounded in the abstract notion of a CuTe layout and a rich algebra of such layouts, including operations such as composition, logical product, and logical division. In this paper, we present a categorical framework for understanding this layout algebra by focusing on a naturally occurring class of tractable layouts. To this end, we define two categories Tuple and Nest whose morphisms give rise to layouts. We define a suite of operations on morphisms in these categories and prove their compatibility with the corresponding layout operations. Moreover, we give a complete characterization of the layouts which arise from our construction. Finally, we provide a Python implementation of our categorical constructions, along with tests that demonstrate alignment with CUTLASS behavior. This implementation can be found at our git repository https://github.com/ColfaxResearch/layout-categories.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。