Overhauling SC atomics in C11 and OpenCL

Author:

Batty Mark1,Donaldson Alastair F.2,Wickerson John2

Affiliation:

1. University of Kent, UK

2. Imperial College London, UK

Abstract

Despite the conceptual simplicity of sequential consistency (SC), the semantics of SC atomic operations and fences in the C11 and OpenCL memory models is subtle, leading to convoluted prose descriptions that translate to complex axiomatic formalisations. We conduct an overhaul of SC atomics in C11, reducing the associated axioms in both number and complexity. A consequence of our simplification is that the SC operations in an execution no longer need to be totally ordered. This relaxation enables, for the first time, efficient and exhaustive simulation of litmus tests that use SC atomics. We extend our improved C11 model to obtain the first rigorous memory model formalisation for OpenCL (which extends C11 with support for heterogeneous many-core programming). In the OpenCL setting, we refine the SC axioms still further to give a sensible semantics to SC operations that employ a ‘memory scope’ to restrict their visibility to specific threads. Our overhaul requires slight strengthenings of both the C11 and the OpenCL memory models, causing some behaviours to become disallowed. We argue that these strengthenings are natural, and that all of the formalised C11 and OpenCL compilation schemes of which we are aware (Power and x86 CPUs for C11, AMD GPUs for OpenCL) remain valid in our revised models. Using the HERD memory model simulator, we show that our overhaul leads to an exponential improvement in simulation time for C11 litmus tests compared with the original model, making *exhaustive* simulation competitive, time-wise, with the *non-exhaustive* CDSChecker tool.

Funder

Engineering and Physical Sciences Research Council

Seventh Framework Programme

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference44 articles.

1. Fences in Weak Memory Models

2. Herding Cats

3. GPU Concurrency

4. AMD Developer Central. AMD APP SDK 3.0 released featuring OpenCL 2.0 2015. URL http: //developer.amd.com/community/blog/2015/08/ 26/introducing-app-sdk-30-opencl-2/. AMD Developer Central. AMD APP SDK 3.0 released featuring OpenCL 2.0 2015. URL http: //developer.amd.com/community/blog/2015/08/ 26/introducing-app-sdk-30-opencl-2/.

5. Warps and Atomics: Beyond Barrier Synchronization in the Verification of GPU Kernels

Cited by 35 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Static Analysis of Memory Models for SMT Encodings;Proceedings of the ACM on Programming Languages;2023-10-16

2. Optimal Reads-From Consistency Checking for C11-Style Memory Models;Proceedings of the ACM on Programming Languages;2023-06-06

3. Probabilistic Concurrency Testing for Weak Memory Programs;Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2;2023-01-27

4. MC Mutants: Evaluating and Improving Testing for Memory Consistency Specifications;Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2;2023-01-27

5. Taking Back Control in an Intermediate Representation for GPU Computing;Proceedings of the ACM on Programming Languages;2023-01-09

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3