Skip to content

Commit

Permalink
Document the quality assurance plan for PRs (#1649)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Julian Miller <[email protected]>
Co-authored-by: Matthew Michel <[email protected]>
  • Loading branch information
3 people authored Jul 1, 2024
1 parent e3a4ed3 commit 7f82b95
Showing 1 changed file with 42 additions and 4 deletions.
46 changes: 42 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ We welcome community contributions to oneAPI DPC++ Library (oneDPL). You can:
- Submit your changes directly with a [pull request](https://github.com/oneapi-src/oneDPL/pulls).
- Log a bug or feedback with an [issue](https://github.com/oneapi-src/oneDPL/issues).

# License

oneDPL is licensed under the terms in [LICENSE](https://github.com/oneapi-src/oneDPL/blob/release_oneDPL/licensing/LICENSE.txt).
By contributing to the project, you agree to the license and copyright terms therein and
release your contribution under these terms.

# Pull Requests

This project follows the
Expand All @@ -13,6 +19,8 @@ your change directly to the repository:

- Make sure your code is in line with our
[coding conventions](#coding-conventions).
- Test your code locally to identify and resolve simple issues by doing
[validation testing](#validation-testing).
- Submit a
[pull request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) into the
main branch. You may add a description of your contribution into [CREDITS.txt](https://github.com/oneapi-src/oneDPL/blob/main/CREDITS.txt).
Expand All @@ -21,9 +29,39 @@ your change directly to the repository:

Running clang-format is required, except in the [test folder](https://github.com/oneapi-src/oneDPL/tree/main/test).

# License
# Validation Testing

oneDPL is licensed under the terms in [LICENSE](https://github.com/oneapi-src/oneDPL/blob/release_oneDPL/licensing/LICENSE.txt).
By contributing to the project, you agree to the license and copyright terms therein and
release your contribution under these terms.
The oneDPL test suite is organized in the test directory by the area of code tested.
* `general` - Basic tests of oneDPL policies and SYCL functionality needed
* `general/sycl_iterator` - Tests of oneDPL algorithms on SYCL buffers
* `kt` - Tests of the oneDPL experimental kernel template algorithms that require specific hardware support
* `parallel_api` - Tests of oneDPL Parallel Algorithms
* `pstl_offload` - Tests of support for offload using standard execution policies
* `xpu_api` - Tests of the use of C++ standard APIs in SYCL kernels

oneDPL validation tests can be configured through CMake to run on different devices including CPU and GPU by specifying the oneDPL backend to use and
the device type to be used if the DPC++ backend is being tested. The oneTBB and OpenMP backends for oneDPL can be used when the device type is CPU or HOST.

To run oneDPL validation tests with the oneDPL build system you will need CMake and CTest installed. The following example shows how to build and run tests
using the GPU on your local system using the Intel® oneAPI DPC++ Compiler.

1. Configure the build files by running the following command that creates a build directory named `build_gpu_tests`.
```
cmake -DCMAKE_CXX_COMPILER=icpx -DCMAKE_CXX_STANDARD=17 -DONEDPL_BACKEND=dpcpp -DONEDPL_DEVICE_TYPE=gpu -DCMAKE_BUILD_TYPE=release -B build_gpu_tests
```

2. Build the tests
```
cmake --build build_gpu_tests --target build-onedpl-tests # specify a specific test name (e.g., reduce.pass) to build a single test
```

3. Run the tests from the `build_gpu_tests` directory
```
ctest --output-on-failure --timeout 1200 -R ^reduce.pass$ # Add -R testname (e.g., -R ^reduce.pass$) to run just one test.
```

Before submitting a PR to the oneDPL repository please run the tests that exercise the code you have updated. If you need help identifying those tests please
check with the maintainers on [UXL Foundation Slack](https://slack-invite.uxlfoundation.org/) using the [#onedpl](https://uxlfoundation.slack.com/channels/onedpl) channel
or ask a question through [GitHub issues](https://github.com/oneapi-src/oneDPL/issues).

For more details on configurations available for oneDPL testing see the [CMake README](https://github.com/oneapi-src/oneDPL/blob/main/cmake/README.md).

0 comments on commit 7f82b95

Please sign in to comment.