Giter Site home page Giter Site logo

aidanbeltons / sycl-cts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from khronosgroup/sycl-cts

0.0 0.0 0.0 3.1 MB

SYCL Conformance Tests

License: Apache License 2.0

CMake 1.21% Python 5.93% C++ 91.50% C 1.17% Dockerfile 0.08% Shell 0.03% Cuda 0.08%

sycl-cts's Introduction

SYCL 2020 Conformance Test Suite

This is the SYCL Conformance Test Suite for the Khronos Group SYCL standard.

The test suite comes in the form of multiple binary executables that must be compiled before running, a step that requires CMake. All test cases inside the tests directory are grouped into categories. Compilation produces executables for each category and one fat executable that contains the tests from all categories.

Important: Due to its large size, by default the CTS is compiled in a lighter configuration that omits some combinations of testing logic for the sake of reduced compilation and execution time. This can be useful during development, however is not sufficient to establish conformance. See the sections on CMake Configuration Options and Generating a Conformance Report for more information.

Configuration & Compilation

To compile the CTS, the following dependencies are required:

  • Python 3.7 or higher
  • CMake 3.15 or higher
  • A conformant OpenCL implementation
  • A SYCL implementation
    • The CTS currently supports ComputeCpp, DPC++ and hipSYCL
    • See the AddSYCLExecutable.cmake module on how to add support for additional SYCL implementations

Configuration and compilation then follow standard CMake procedures. Begin by cloning this repository and its submodules:

git clone --recurse-submodules https://github.com/KhronosGroup/SYCL-CTS.git

Then enter the SYCL-CTS folder and configure the build using CMake:

cmake -S . -B build -DSYCL_IMPLEMENTATION=<ComputeCpp|DPCPP|hipSYCL>

See CMake Configuration Options for additional configuration options that can be passed here.

Finally, start the compilation:

cmake --build ./build

After the compilation has finished, test executables for each category will be placed in the build/bin directory. The test_all executable contains tests for all categories.

CMake Configuration Options

The CTS can be configured using the following CMake configuration options:

SYCL_IMPLEMENTATION (default: None) One of ComputeCpp, DPCPP or hipSYCL.

SYCL_CTS_EXCLUDE_TEST_CATEGORIES (default: None) Optional file specifying a list of test categories to be excluded from the build.

SYCL_CTS_ENABLE_FULL_CONFORMANCE (default: OFF) Enable extended type coverage and testing logic with significantly increased compilation and execution time. This mode is required to establish the conformance of a SYCL implementation.

SYCL_CTS_VERBOSE_LOG (default: OFF) Enable verbose debug-level logging.

SYCL_CTS_ENABLE_DOUBLE_TESTS (default: ON) Enable tests that require double precision floating point capabilities.

SYCL_CTS_ENABLE_HALF_TESTS (default: ON) Enable tests that require half precision floating point capabilities.

SYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS (default ON) Enable tests for legacy SYCL features. Should be switched on for conformance.

SYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS (default: ON) Enable OpenCL interoperability tests.

Additionally, the following SYCL implementation-specific options can be used:

COMPUTECPP_INSTALL_DIR (default: None)

DPCPP_INSTALL_DIR (default: None)

DPCPP_FLAGS (default: None) Set additional compiler flags for DPC++ compiler. This options applies only if SYCL_IMPLEMENTATION is set to DPCPP.

DPCPP_TARGET_TRIPLES (default: None) Configures compilation for specified target triple.

DPCPP_DISABLE_SYCL2020_DEPRECATION_WARNINGS (default: ON) Disables warnings about using features deprecated by SYCL 2020.

DPCPP_SYCL2020_CONFORMANT_APIS (default: ON) Enables conformant SYCL 2020 API in DPC++ implementation. Current DPC++ version exposes SYCL 1.2.1 compatible API version by default.

Running the Test Suite

Each of the executables produced in the build/bin directory acts as a standalone test runner that can be used to launch tests for a particular test category (or all tests in the case of build/bin/test_all).

The --device argument is used to specify which device to run the tests on. Selection is based on substring matching of the device name. ECMAScript regular expression syntax is supported. To get a list of all available devices, use --list-devices.

Please see <test_executable> --help for a complete list of available filtering and output formatting options.

Generating a Conformance Report

To generate a conformance report, use the run_conformance_tests.py script. This script automates the configuration, compilation and execution of the CTS, generating a report file conformance_report.xml. By default, the script will enable the SYCL_CTS_ENABLE_FULL_CONFORMANCE option, resulting in long compilation and execution times.

Please see run_conformance_tests.py --help for a complete list of available options.

Contributing to the CTS

See the SYCL CTS Developer Documentation.

sycl-cts's People

Contributors

vasilytric avatar bader avatar kopylovanat avatar yuriykoch avatar psalz avatar andreyromanof avatar keryell avatar kovshikovser avatar aidanbeltons avatar gmlueck avatar progtx avatar tapplencourt avatar steffenlarsen avatar raaiq1 avatar againull avatar cperkinsintel avatar nuullll avatar nyalloc avatar illuhad avatar alan-forbes-cp avatar alexbatashev avatar alexeysachkov avatar aelovikov-intel avatar aerialmantis avatar hvdijk avatar jbrodman avatar smaslov-intel avatar npmiller avatar t4c1 avatar tremmelg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.