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

Test with SYCL in the CI #235

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,45 @@ jobs:

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/mdspan-build

- name: Check Out
uses: actions/checkout@v2
with:
path: ${{github.workspace}}/mdspan-src

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
run: CXX=${{ matrix.compiler_prefix}}/${{ matrix.compiler_driver }} cmake $GITHUB_WORKSPACE/mdspan-src -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/mdspan-install -DMDSPAN_ENABLE_TESTS=ON -DMDSPAN_ENABLE_EXAMPLES=ON

- name: Build
run: CXX=${{ matrix.compiler_prefix}}/${{ matrix.compiler_driver }} cmake $GITHUB_WORKSPACE/mdspan-src -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/mdspan-install -DMDSPAN_ENABLE_TESTS=ON -DMDSPAN_ENABLE_EXAMPLES=ON ${{ matrix.enable_backend }}

- name: Build (icpx)
if: ${{ matrix.compiler_driver == 'icpx' }}
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
run: |
. /opt/intel/oneapi/setvars.sh
make -j

- name: Build (non-icpx)
if: ${{ matrix.compiler_driver != 'icpx' }}
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
run: make -j

- name: Test

- name: Test (icpx)
if: ${{ matrix.compiler_driver == 'icpx' }}
working-directory: ${{github.workspace}}/mdspan-build
shell: bash
run: ctest

run: |
. /opt/intel/oneapi/setvars.sh
ctest --output-on-failure

- name: Test (non-icpx)
if: ${{ matrix.compiler_driver != 'icpx' }}
working-directory: ${{github.workspace}}/mdspan-build
shell: bash
run: ctest --output-on-failure

- name: Install
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
Expand Down
4 changes: 4 additions & 0 deletions tests/offload_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
//@HEADER

#ifdef _MDSPAN_HAS_SYCL
#if __has_include(<sycl/sycl.hpp>)
#include <sycl/sycl.hpp>
#else
#include <CL/sycl.hpp>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this SYCL implementation does not provides this deprecated SYCL 1.2.1 header now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this one only had the deprecated header. Not quite sure if updating the compiler in the CI is worth it for this pull request.

#endif
#endif

#ifdef _MDSPAN_HAS_HIP
Expand Down