You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
oneDPL installation through cmake is not automatically and regularly tested. However, it should be.
Problem Statement:
The lack of testing may lead to issues or oversights like the one detected in #1964.
Preferred Solution:
It would be convenient to have a micro cmake project using find_package(oneDPL REQUIRED) and calling some oneDPL APIs, which is a part of the main cmake test suite.
To be more precise, the solution can be:
A micro project relying on find_package(oneDPL): e.g. one *.cpp file and CMakeLists.txt.
The test is triggered through a typical cmake command for testing (see the CI as an example).
It is Included into build-onedpl-test and run-onedpl-test umbrella targets.
It respects the passed ONEDPL_BACKEND as a custom option and built-in options like CMAKE_BUILD_TYPE, CMAKE_CXX_FLAGS and so on.
The test itself should test a device policy when available, and a host policy depending on ONEDPL_PAR_BACKEND configuration from oneDPLConfig.cmake.
The pipeline can look as (the approach may be different if there are better ideas, though):
CMake is configured, e.g.: cmake -DCMAKE_CXX_COMPILER=icpx -DCMAKE_BUILD_TYPE=release -DONEDPL_BACKEND=tbb /path/to/oneDPL. See the full examples in the CI.
All targets are build together with this one, e.g.: make build-onedpl-tests. While the new target may do that:
Set up CMAKE_INSTALL_PREFIX=/path/to/install
Install oneDPL: cmake --build . --target install
Configure the micro project: cmake -B /path/to/test_folder/build -DCMAKE_PREFIX_PATH=/path/to/install <other flags> /path/to/test_folder. Other flags should include ONEDPL_PAR_BACKEND (selected according to ONEDPL_BACKEND passed at stage the 1. and other standard cmake flags such as CMAKE_BUILD_TYPE.
Create a target for ctest.
All tests are run, e.g.: ctest --output-on-failure.
Additional Notes
The test itself should include the test config for TestUtils::done() needed for ctest to report the status. Other features from the framework may also be needed, such as TestUtils::default_dpcpp_policy.
The text was updated successfully, but these errors were encountered:
Summary:
oneDPL installation through cmake is not automatically and regularly tested. However, it should be.
Problem Statement:
The lack of testing may lead to issues or oversights like the one detected in #1964.
Preferred Solution:
It would be convenient to have a micro cmake project using
find_package(oneDPL REQUIRED)
and calling some oneDPL APIs, which is a part of the main cmake test suite.To be more precise, the solution can be:
find_package(oneDPL)
: e.g. one*.cpp
file andCMakeLists.txt
.build-onedpl-test
andrun-onedpl-test
umbrella targets.ONEDPL_BACKEND
as a custom option and built-in options likeCMAKE_BUILD_TYPE
,CMAKE_CXX_FLAGS
and so on.ONEDPL_PAR_BACKEND
configuration fromoneDPLConfig.cmake
.The pipeline can look as (the approach may be different if there are better ideas, though):
cmake -DCMAKE_CXX_COMPILER=icpx -DCMAKE_BUILD_TYPE=release -DONEDPL_BACKEND=tbb /path/to/oneDPL
. See the full examples in the CI.make build-onedpl-tests
. While the new target may do that:CMAKE_INSTALL_PREFIX=/path/to/install
cmake --build . --target install
cmake -B /path/to/test_folder/build -DCMAKE_PREFIX_PATH=/path/to/install <other flags> /path/to/test_folder
. Other flags should includeONEDPL_PAR_BACKEND
(selected according toONEDPL_BACKEND
passed at stage the1.
and other standard cmake flags such asCMAKE_BUILD_TYPE
.ctest --output-on-failure
.Additional Notes
The test itself should include the test config for
TestUtils::done()
needed for ctest to report the status. Other features from the framework may also be needed, such asTestUtils::default_dpcpp_policy
.The text was updated successfully, but these errors were encountered: