Taking back control in an intermediate representation for GPU computing
File(s)3571253.pdf (1.08 MB)
Published version
Author(s)
Type
Journal Article
Abstract
We describe our experiences successfully applying lightweight formal methods to substantially improve and reformulate an important part of Standard Portable Intermediate Representation SPIRV, an industry-standard language for GPU computing. The formal model that we present has allowed us to (1) identify several ambiguities and needless complexities in the way that structured control flow was defined in the SPIRV specification; (2) interact with the authors of the SPIRV specification to rectify these problems; (3) validate the developer tools and conformance test suites that support the SPIRV language by cross-checking them against our formal model, improving the tools, test suites, and our models in the process; and (4) develop a novel method for fuzzing SPIRV compilers to detect miscompilation bugs that leverages our formal model. The latest release of the SPIRV specification incorporates the revised set of control-flow definitions that have arisen from our work. Furthermore, our novel compiler-fuzzing technique has led to the discovery of twenty distinct, previously unknown bugs in SPIRV compilers from Google, the Khronos Group, Intel, and Mozilla. Our work showcases the practical impact that formal modelling and analysis techniques can have on the design and implementation of industry-standard programming languages.
Date Issued
2023-01
Date Acceptance
2023-01-01
Citation
Proceedings of the ACM on Programming Languages, 2023, 7 (POPL), pp.1740-1769
ISSN
2475-1421
Publisher
Association for Computing Machinery (ACM)
Start Page
1740
End Page
1769
Journal / Book Title
Proceedings of the ACM on Programming Languages
Volume
7
Issue
POPL
Copyright Statement
Copyright © 2023 Owner/Author.
This work is licensed under a Creative Commons Attribution 4.0 International License.
This work is licensed under a Creative Commons Attribution 4.0 International License.
License URL
Identifier
https://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000910847500060&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=a2bf6146997ec60c407a63945d4e92bb
Subjects
Computer Science
Computer Science, Software Engineering
control flow
fuzz testing
GPUs
Science & Technology
shader/kernel language compilers
SPIR-V
Technology
Publication Status
Published
Article Number
60
Date Publish Online
2023-01-11