A Programming Language Interface to Describe Transformations and Code Generation

被引:22
|
作者
Rudy, Gabe [1 ]
Khan, Malik Murtaza [2 ]
Hall, Mary [1 ]
Chen, Chun [1 ]
Chame, Jacqueline [2 ]
机构
[1] Univ Utah, Sch Comp, Salt Lake City, UT 84112 USA
[2] USC Informat Sci Inst, Marina Del Rey, CA 90295 USA
基金
美国国家科学基金会;
关键词
LOOP; PARALLELISM;
D O I
10.1007/978-3-642-19595-2_10
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
This paper presents a programming language interface, a complete scripting language, to describe composable compiler transformations. These transformation programs can be written, shared and reused by non-expert application and library developers. From a compiler writer's perspective, a scripting language interface permits rapid prototyping of compiler algorithms that can mix levels and compose different sequences of transformations, producing readable code as output. From a library or application developer's perspective, the use of transformation programs permits expression of clean high-level code, and a separate description of how to map that code to architectural features, easing maintenance and porting to new architectures. We illustrate this interface in the context of CUDA-CHiLL, a source-to-source compiler transformation and code generation framework that transforms sequential loop nests to high-performance CPU code. We show how this high-level transformation and code generation language can be used to express: (1) complex transformation sequences, exemplified by a single loop restructuring construct used to generate a series of tiling and permute commands; and, (2) complex code generation sequences to produce CUDA code from a high-level specification. We demonstrate that the automatically-generated code either performs closely or outperforms two hand-tuned CPU library kernels from Nvidia's CUBLAS 2.2 and 3.2 libraries.
引用
收藏
页码:136 / +
页数:4
相关论文
共 50 条
  • [1] A programming language for matrices operations and LATEX code generation
    Benaddy, Mohamed
    El Habil, Brahim
    2016 INTERNATIONAL CONFERENCE ON ENGINEERING & MIS (ICEMIS), 2016,
  • [2] Automatic Generation of Programming Exercises and Code Explanations Using Large Language Models
    Sarsa, Sami
    Denny, Paul
    Hellas, Arto
    Leinonen, Juho
    PROCEEDINGS OF THE 2022 ACM CONFERENCE ON INTERNATIONAL COMPUTING EDUCATION RESEARCH, ICER 2022, VOL. 1, 2023, : 27 - 43
  • [4] A Programming Language Is Not a User Interface
    Wagner, Arno
    COMMUNICATIONS OF THE ACM, 2014, 57 (09) : 8 - 8
  • [5] A programming language is not a user interface
    Wagner, Arno, 1600, Association for Computing Machinery (57):
  • [6] Code generation methods for tiling transformations
    Goumas, G
    Athanasaki, M
    Koziris, N
    JOURNAL OF INFORMATION SCIENCE AND ENGINEERING, 2002, 18 (05) : 667 - 691
  • [7] Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Review
    Wong, Man-Fai
    Guo, Shangxin
    Hang, Ching-Nam
    Ho, Siu-Wai
    Tan, Chee-Wei
    ENTROPY, 2023, 25 (06)
  • [8] INTERFACE LANGUAGE FOR SUPPORTING PROGRAMMING STYLES
    TAN, YM
    SIGPLAN NOTICES, 1994, 29 (08): : 74 - 83
  • [9] Formal Verification of QVT Transformations for Code Generation
    Stenzel, Kurt
    Moebius, Nina
    Reif, Wolfgang
    MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS, 2011, 6981 : 533 - 547
  • [10] Al Coders Are among Us: Rethinking Programming Language Grammar towards Efficient Code Generation
    Sun, Zhensu
    Du, Xiaoning
    Yang, Zhou
    Li, Li
    Lo, David
    PROCEEDINGS OF THE 33RD ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2024, 2024, : 1124 - 1136