Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pstl-offload] PSTL Offload files cleanup #1752

Merged
merged 5 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
113 changes: 0 additions & 113 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,119 +222,6 @@ jobs:
make VERBOSE=1 -j${BUILD_CONCURRENCY} ${make_targets}
ctest --timeout ${TEST_TIMEOUT} --output-on-failure ${ctest_flags}

linux-pstl-offload-testing:
name: PSTL offload ${{ matrix.device_type }},bknd=dpcpp,cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=с++${{ matrix.std }},cfg=${{ matrix.build_type }}
runs-on: ['${{ matrix.os }}']
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
cxx_compiler: icpx
std: 17
build_type: release
device_type: cpu
steps:
- uses: actions/checkout@v4
- name: Set up Intel APT repository
run: |
# https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2024-0/apt.html
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update -y
- name: Install Intel® oneAPI Threading Building Blocks
run: |
sudo apt-get install intel-oneapi-tbb-devel -y
- name: Install Intel® oneAPI DPC++/C++ Compiler
run: |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp -y
# Avoid accidental use of a released version, keeping libpstloffload.so
sudo rm -rf ${LINUX_ONEAPI_PATH}/dpl/latest/include
- name: Run testing
shell: bash
run: |
set -x
source ${LINUX_ONEAPI_PATH}/setvars.sh
echo "::warning::CMake: $(cmake --version)"
echo "::warning::Compiler: $(${{ matrix.cxx_compiler }} --version)"

make_targets="build-onedpl-pstloffload_smoke_tests-tests"
ctest_flags="-L pstloffload_smoke_tests"

mkdir build && cd build
lscpu
device_type=${{ matrix.device_type }}
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=dpcpp \
-D_ONEDPL_PSTL_OFFLOAD=$device_type ..

make pstloffload
source vars.sh

make VERBOSE=1 -j${BUILD_CONCURRENCY} ${make_targets}

ctest --timeout ${TEST_TIMEOUT} --output-on-failure ${ctest_flags}

windows-pstl-offload-testing:
name: PSTL offload ${{ matrix.device_type }},bknd=${{ matrix.backend }},cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=c++${{ matrix.std }},cfg=${{ matrix.build_type }}
runs-on: ['${{ matrix.os }}']
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
cxx_compiler: icx-cl
std: 17
build_type: release
backend: dpcpp
device_type: cpu
steps:
- uses: actions/checkout@v4
- name: Install Intel® oneAPI Threading Building Blocks
if: (matrix.backend == 'tbb' || matrix.backend == 'dpcpp')
shell: cmd
run: |
curl %WINDOWS_TBB_DOWNLOAD_LINK% --output tbb_install.exe
tbb_install.exe -s -a --silent --eula accept -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0
del tbb_install.exe
- name: Install Intel® oneAPI DPC++/C++ Compiler
shell: cmd
run: |
curl %WINDOWS_ICPX_DOWNLOAD_LINK% --output icpx_install.exe
icpx_install.exe -s -a --silent --eula accept -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0
del icpx_install.exe
:: Avoid accidental use of a released version
rd /s /q "%WINDOWS_ONEAPI_PATH%\dpl"
- name: Run testing
shell: cmd
run: |
if exist "%WINDOWS_ONEAPI_PATH%\setvars.bat" (
call "%WINDOWS_ONEAPI_PATH%\setvars.bat"
)
if "${{ matrix.cxx_compiler }}" == "cl" (
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
)
powershell $output = cmake --version; Write-Host ::warning::CMake: $output
powershell $output = ${{ matrix.cxx_compiler }} --version; Write-Host ::warning::Compiler: $output

set ninja_targets=build-onedpl-pstloffload_smoke_tests-tests
set ctest_flags= -L pstloffload_smoke_tests

mkdir build && cd build

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=${{ matrix.backend }} -D_ONEDPL_PSTL_OFFLOAD=${{ matrix.device_type }} .. || goto :short_circuit_fail
ninja -j 2 -v pstloffload || goto :short_circuit_fail
call .\vars.bat
ninja -j 2 -v %ninja_targets% || goto :short_circuit_fail
ctest --timeout %TEST_TIMEOUT% -C ${{ matrix.build_type }} --output-on-failure %ctest_flags% || goto :short_circuit_fail
exit /b 0
:: modify the default behaviour of shell:cmd, which exits with the status of a last command, in order not to unintentially miss an error
:short_circuit_fail
exit /b %errorlevel%

windows-testing:
name: ${{ matrix.device_type }},bknd=${{ matrix.backend }},cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=c++${{ matrix.std }},cfg=${{ matrix.build_type }}
runs-on: ['${{ matrix.os }}']
Expand Down
24 changes: 0 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,30 +373,6 @@ if (NOT _ONEDPL_PSTL_OFFLOAD STREQUAL off)
message(STATUS "Adding ${FSYCL_PSTL_OFFLOAD_OPTION} compiler option")
target_compile_options(oneDPL INTERFACE ${FSYCL_PSTL_OFFLOAD_OPTION})
target_link_libraries(oneDPL INTERFACE ${FSYCL_PSTL_OFFLOAD_OPTION})
else()
# TODO: remove this "manual" -fsycl-pstl-offload suboption substitution and replace with FATAL_ERROR
# message(FATAL_ERROR "${CMAKE_CXX_COMPILER} doesn't support ${FSYCL_PSTL_OFFLOAD_OPTION}")
danhoeflinger marked this conversation as resolved.
Show resolved Hide resolved
message(STATUS "Adding manual ${FSYCL_PSTL_OFFLOAD_OPTION} compiler options")
if (_ONEDPL_PSTL_OFFLOAD STREQUAL default)
set(PSTL_OFFLOAD_MACRO_VALUE 1)
elseif (_ONEDPL_PSTL_OFFLOAD STREQUAL cpu)
set(PSTL_OFFLOAD_MACRO_VALUE 2)
elseif (_ONEDPL_PSTL_OFFLOAD STREQUAL gpu)
set(PSTL_OFFLOAD_MACRO_VALUE 3)
else()
message(FATAL_ERROR "Unknown value of _ONEDPL_PSTL_OFFLOAD = ${_ONEDPL_PSTL_OFFLOAD}")
endif()

target_include_directories(oneDPL INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include/pstl_offload)
target_compile_options(oneDPL INTERFACE "-D__SYCL_PSTL_OFFLOAD__=${PSTL_OFFLOAD_MACRO_VALUE}")
endif()

add_subdirectory(src)

# TODO remove explicit linkage with libpstloffload
if (NOT _fsycl_pstl_offload_option)
add_dependencies(oneDPL pstloffload)
target_link_libraries(oneDPL INTERFACE pstloffload)
endif()
endif()

Expand Down
26 changes: 0 additions & 26 deletions include/pstl_offload/algorithm

This file was deleted.

25 changes: 0 additions & 25 deletions include/pstl_offload/any

This file was deleted.

25 changes: 0 additions & 25 deletions include/pstl_offload/array

This file was deleted.

25 changes: 0 additions & 25 deletions include/pstl_offload/atomic

This file was deleted.

25 changes: 0 additions & 25 deletions include/pstl_offload/barrier

This file was deleted.

25 changes: 0 additions & 25 deletions include/pstl_offload/bit

This file was deleted.

25 changes: 0 additions & 25 deletions include/pstl_offload/bitset

This file was deleted.

25 changes: 0 additions & 25 deletions include/pstl_offload/cassert

This file was deleted.

25 changes: 0 additions & 25 deletions include/pstl_offload/cctype

This file was deleted.

Loading
Loading