Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3579990.3580014acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article
Open access

D2X: An eXtensible conteXtual Debugger for Modern DSLs

Published: 22 February 2023 Publication History

Abstract

Compiled Domain Specific Languages are taking over various high-performance domains because of their ability to exploit the domain knowledge and apply optimizations that produce the most specialized code. A lot of research has gone into making DSLs more performant and easy to prototype. But the Achilles heel for DSLs is still the lack of debugging support that provides an end-to-end picture to the user and improves the productivity of both the DSL designer and the end-user. Conventional techniques extend the compilers, the debugging information format, and the debuggers themselves to provide more information than what the debugger can provide when attached to the generated code. Such an approach quickly stops scaling as adding extensions to large and complex debuggers hampers DSL designer productivity. We present D2X, a DSL debugging infrastructure that works with most standard debuggers without any modifications and is easily extensible to capture all the domain specific information the end-user cares about. We show that we can add debugging support to the state-of-the-art graph DSL GraphIt with as little as 1.4% changes to the compiler code base. We also apply our techniques to a meta-programming DSL framework BuildIt so that any DSLs built on top of BuildIt get debugging support without any modifications further boosting the productivity of future DSL designers.

References

[1]
Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. 2015. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. http://tensorflow.org/ Software available from tensorflow.org
[2]
Jonathan Ragan-Kelley, Connelly Barnes, Andrew Adams, Sylvain Paris, Frédo Durand, and Saman Amarasinghe. [n. d.]. Halide: A Language and Compiler for Optimizing Parallelism, Locality, and Recomputation in Image Processing Pipelines.
[3]
Erwan Bousse, Tanja Mayerhofer, and Manuel Wimmer. 2017. Domain-level Debugging for Compiled DSLs with the GEMOC Studio. In MoDELS.
[4]
Erwan Bousse and Manuel Wimmer. 2019. Domain-Level Observation and Control for Compiled Executable DSLs. In 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems (MODELS). 150–160.
[5]
Ajay Brahmakshatriya and Saman Amarasinghe. 2021. BuildIt: A type based multistage programming framework for code generation in C++. In Proc. CGO.
[6]
Ajay Brahmakshatriya and Saman Amarasinghe. 2022. Artifacts for the CGO23 paper: D2X: An eXtensible conteXtual Debugger for modern DSLs. https://doi.org/10.5281/zenodo.7459640
[7]
Ajay Brahmakshatriya and Saman Amarasinghe. 2022. GraphIt to CUDA Compiler in 2021 LOC: A Case for High-Performance DSL Implementation via Staging with BuilDSL. In Proc. CGO.
[8]
Ajay Brahmakshatriya, Yunming Zhang, Changwan Hong, Shoaib Kamil, Julian Shun, and Saman Amarasinghe. 2021. Compiling Graph Applications for GPUs with GraphIt. In Proc. CGO.
[9]
BuildIt-lang. 2022. Einsum DSL implemented with the BuildIt framework. https://buildit.so/tryit/?sample=einsum
[10]
Tianqi Chen, Thierry Moreau, Ziheng Jiang, Lianmin Zheng, Eddie Yan, Meghan Cowan, Haichen Shen, Leyuan Wang, Yuwei Hu, Luis Ceze, Carlos Guestrin, and Arvind Krishnamurthy. 2018. TVM: An Automated End-to-End Optimizing Compiler for Deep Learning. In Proc. OSDI.
[11]
Charisee Chiw, Gordon Kindlmann, John Reppy, Lamont Samuels, and Nick Seltzer. 2012. Diderot: A Parallel DSL for Image Analysis and Visualization. In Proc. PLDI.
[12]
DWARF Debugging Information Format Committee. 2017. DWARF Debugging Information Format Version 5. https://dwarfstd.org
[13]
Giuseppe Antonio Di Luna, Davide Italiano, Luca Massarelli, Sebastian Österlund, Cristiano Giuffrida, and Leonardo Querzoni. 2021. Who’s Debugging the Debuggers? Exposing Debug Information Bugs in Optimized Binaries. In Proc. ASPLOS.
[14]
Zoé Drey and Ciprian Teodorov. 2016. Object-Oriented Design Pattern for DSL Program Monitoring. In Proc. SLE.
[15]
The Event Horizon Telescope Collaboration et. al. 2019. First M87 Event Horizon Telescope Results. IV. Imaging the Central Supermassive Black Hole. ApJL.
[16]
Yuanming Hu, Tzu-Mao Li, Luke Anderson, Jonathan Ragan-Kelley, and Frédo Durand. 2019. Taichi: A Language for High-Performance Computation on Spatially Sparse Data Structures. ACM Trans. Graph.
[17]
Fredrik Kjolstad, Shoaib Kamil, Jonathan Ragan-Kelley, David I. W. Levin, Shinjiro Sueda, Desai Chen, Etienne Vouga, Danny M. Kaufman, Gurtej Kanwar, Wojciech Matusik, and Saman Amarasinghe. 2016. Simit: A Language for Physical Simulation. ACM Trans. Graph.
[18]
Chris Lattner, Mehdi Amini, Uday Bondhugula, Albert Cohen, Andy Davis, Jacques Arnaud Pienaar, River Riddle, Tatiana Shpeisman, Nicolas Vasilache, and Oleksandr Zinenko. 2021. MLIR: Scaling Compiler Infrastructure for Domain Specific Computation. In Proc. CGO.
[19]
Bozhen Liu and Jeff Huang. 2018. D4: Fast Concurrency Debugging with Parallel Differential Analysis. In Proc. PLDI.
[20]
David Patterson, Joseph Gonzalez, Urs Hölzle, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. 2022. The Carbon Footprint of Machine Learning Training Will Plateau, Then Shrink.
[21]
Tiark Rompf, Arvind K. Sujeeth, HyoukJoong Lee, Kevin J. Brown, Hassan Chafi, Martin Odersky, and Kunle Olukotun. 2011. Building-Blocks for Performance Oriented DSLs. Electronic Proceedings in Theoretical Computer Science.
[22]
Roy Schwartz, Jesse Dodge, Noah A. Smith, and Oren Etzioni. 2020. Green AI. Commun. ACM.
[23]
Ariya Shajii, Ibrahim Numanagić, Riyadh Baghdadi, Bonnie Berger, and Saman Amarasinghe. 2019. Seq: A High-Performance Language for Bioinformatics. In Proc. OOPSLA.
[24]
Eelco Visser. 2008. WebDSL: A Case Study in Domain-Specific Language Engineering.
[25]
Hui Wu, Jeff Gray, and Marjan Mernik. 2008. Grammar-driven generation of domain-specific language debuggers. Software: Practice and Experience.
[26]
Hui Wu, Jeffrey G. Gray, and Marjan Mernik. 2004. Debugging Domain-Specific Languages in Eclipse.
[27]
Yunming Zhang, Ajay Brahmakshatriya, Xinyi Chen, Laxman Dhulipala, Shoaib Kamil, Saman Amarasinghe, and Julian Shun. [n. d.]. Optimizing Ordered Graph Algorithms with GraphIt.
[28]
Yunming Zhang, Mengjiao Yang, Riyadh Baghdadi, Shoaib Kamil, Julian Shun, and Saman Amarasinghe. [n. d.]. GraphIt: A High-Performance Graph DSL.

Cited By

View all
  • (2024)Moldable ExceptionsProceedings of the 2024 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3689492.3690044(1-12)Online publication date: 17-Oct-2024
  • (2024)NetBlocks: Staging Layouts for High-Performance Custom Host Network StacksProceedings of the ACM on Programming Languages10.1145/36563968:PLDI(467-491)Online publication date: 20-Jun-2024
  • (2024)Language Protocols for Domain-Specific DebuggingProceedings of the ACM/IEEE 27th International Conference on Model Driven Engineering Languages and Systems10.1145/3652620.3676881(204-207)Online publication date: 22-Sep-2024
  • Show More Cited By

Index Terms

  1. D2X: An eXtensible conteXtual Debugger for Modern DSLs

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    CGO '23: Proceedings of the 21st ACM/IEEE International Symposium on Code Generation and Optimization
    February 2023
    262 pages
    ISBN:9798400701016
    DOI:10.1145/3579990
    This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 22 February 2023

    Permissions

    Request permissions for this article.

    Check for updates

    Badges

    Author Tags

    1. DSLs
    2. compilers
    3. debuggers

    Qualifiers

    • Research-article

    Funding Sources

    • DARPA SDH
    • Applications Driving Architectures (ADA) Research Center

    Conference

    CGO '23

    Acceptance Rates

    Overall Acceptance Rate 312 of 1,061 submissions, 29%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)316
    • Downloads (Last 6 weeks)33
    Reflects downloads up to 20 Nov 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Moldable ExceptionsProceedings of the 2024 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3689492.3690044(1-12)Online publication date: 17-Oct-2024
    • (2024)NetBlocks: Staging Layouts for High-Performance Custom Host Network StacksProceedings of the ACM on Programming Languages10.1145/36563968:PLDI(467-491)Online publication date: 20-Jun-2024
    • (2024)Language Protocols for Domain-Specific DebuggingProceedings of the ACM/IEEE 27th International Conference on Model Driven Engineering Languages and Systems10.1145/3652620.3676881(204-207)Online publication date: 22-Sep-2024
    • (2024)eCC++ : A Compiler Construction Framework for Embedded Domain-Specific Languages2024 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW)10.1109/IPDPSW63119.2024.00129(667-677)Online publication date: 27-May-2024

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media