15651

Automatic test case reduction of randomly generated OpenCL kernels

Moritz Pflanzer
Imperial College London, Department of Computing
Imperial College London, 2015
@article{pflanzer2015automatic,

   title={Automatic test case reduction of randomly generated OpenCL kernels},

   author={Pflanzer, Moritz and Donaldson, Alastair and Lascu, Andrei and Field, Tony},

   year={2015}

}

Download Download (PDF)   View View   Source Source   

261

views

While software developers can review their programs to fix bugs, they might not be able to patch a compiler bug due to which their perfectly valid programs misbehave. Moreover, even a formal verification of source code provides no guarantees if the code is miscompiled. For these reasons great effort is spent to increase the reliability of compilers. One recent approach is compiler fuzzing in combination with random differential testing to detect miscompilations. Because the correct behaviour of randomly generated programs is not known they are compiled with multiple compilers or with different optimisation levels and the behaviour of the resulting binaries is compared to detect miscompilations. Randomly generated programs are often large, sometimes by necessity, because this increases the chances that they cause a bug. On the other hand, for large programs it is more difficult to locate and extract the root cause of the triggered bug. Therefore automatic test case reduction was recently proposed in the context of testing C compilers. The key problem with the idea to automatically remove parts from test cases is to avoid undefined behaviour because it leads to useless reduction results if it interferes with the actual misbehaviour or is present in the final test cases. In the scope of this project the existing implementation of the C-Reduce framework has been lifted to the domain of OpenCL kernels. In doing so the principal challenge has been to find appropriate analysis tools for the design of interestingness tests to prevent undefined behaviour, because the previously used tools are not compatible with OpenCL. It turned out that a reliable detection of undefined behaviour is only possible if the dynamic analysis of Oclgrind is used as oracle. To make this practical, the most significant achievement has been the design of a new plugin to reliably detect the usage of undefined values which have been identified as one of the largest sources of undefined behaviour which is overlooked by static tools. Additionally, the contributions of this project include bug reports and patches for general issues with Oclgrind, a patch to fix a case of wrong code generation in the Clang compiler which has been discovered during the project and improvements of the transformations in C-Reduce. Further, parts of the C-Reduce algorithm for Windows have been reimplemented to improve the performance of the automatic reductions. Finally, the robustness and performance of automatic reductions in the domain of many-core compilers have been evaluated. The reduced test cases are free from undefined behaviour and with less than one kilobyte small enough to be reported without the need for manual postprocessing. Moreover, the average reduction time of 100 minutes per test case is short enough to integrate the process into the everyday development.
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

* * *

* * *

TwitterAPIExchange Object
(
    [oauth_access_token:TwitterAPIExchange:private] => 301967669-yDz6MrfyJFFsH1DVvrw5Xb9phx2d0DSOFuLehBGh
    [oauth_access_token_secret:TwitterAPIExchange:private] => o29ji3VLVmB6jASMqY8G7QZDCrdFmoTvCDNNUlb7s
    [consumer_key:TwitterAPIExchange:private] => TdQb63pho0ak9VevwMWpEgXAE
    [consumer_secret:TwitterAPIExchange:private] => Uq4rWz7nUnH1y6ab6uQ9xMk0KLcDrmckneEMdlq6G5E0jlQCFx
    [postfields:TwitterAPIExchange:private] => 
    [getfield:TwitterAPIExchange:private] => ?cursor=-1&screen_name=hgpu&skip_status=true&include_user_entities=false
    [oauth:protected] => Array
        (
            [oauth_consumer_key] => TdQb63pho0ak9VevwMWpEgXAE
            [oauth_nonce] => 1474836694
            [oauth_signature_method] => HMAC-SHA1
            [oauth_token] => 301967669-yDz6MrfyJFFsH1DVvrw5Xb9phx2d0DSOFuLehBGh
            [oauth_timestamp] => 1474836694
            [oauth_version] => 1.0
            [cursor] => -1
            [screen_name] => hgpu
            [skip_status] => true
            [include_user_entities] => false
            [oauth_signature] => ju4JwyJl5Xq0YpSqmf6ZQ0Bi9eg=
        )

    [url] => https://api.twitter.com/1.1/users/show.json
)
Follow us on Facebook
Follow us on Twitter

HGPU group

1996 peoples are following HGPU @twitter

HGPU group © 2010-2016 hgpu.org

All rights belong to the respective authors

Contact us: