-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add limited PR testing #101
Open
cwpearson
wants to merge
17
commits into
kokkos:main
Choose a base branch
from
cwpearson:ci/github-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+339
−0
Open
Changes from 4 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ade0355
Add CPU-only PR tests
cwpearson 9bdf9d7
ci: modify script to add exercise 04 for CUDA
cwpearson f48ca12
ci: add windows build
cwpearson 1ed5bf7
ci: CUDA
cwpearson 3600d67
ci: Enable more exercises for Linux/macOS builds
cwpearson 7a9c015
ci: Add kokkos-kernels builds for Linux/macOs
cwpearson a1c47c0
ci: unix: install OpenMPI
cwpearson dbcc599
ci: cuda: disable tasking
cwpearson 5224126
ci: unix: mpi
cwpearson 9a30f34
mpi_exch, mpi_heat_conduction: link MPI target
cwpearson 1538717
ci: remove windows-specific thing from unix build
cwpearson 4b640a4
ci: condution -> conduction
cwpearson c251e9c
ci: mpi_heat_conduction requires cuda
cwpearson 60bd876
ci: mpi_exch/Begin does not exist
cwpearson 3807784
ci: heat3d -> mpi_exch
cwpearson 0eb4e97
ci: cuda don't build virtualfunction
cwpearson 17d07c9
Remove `-DKokkos_ENABLE_COMPILER_WARNINGS=ON`
cwpearson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Hosted Runners (linux, CUDA) | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: nvidia/cuda:12.6.2-devel-ubuntu22.04 | ||
steps: | ||
- name: Install cmake | ||
run: > | ||
apt-get update && apt-get install | ||
-y --no-install-suggests --no-install-recommends | ||
cmake | ||
|
||
- name: Checkout Kokkos Tutorials | ||
uses: actions/checkout@v4 | ||
with: | ||
path: kokkos-tutorials | ||
|
||
- name: Checkout Kokkos | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'kokkos/kokkos' | ||
ref: master | ||
path: kokkos | ||
|
||
- name: Configure Kokkos | ||
run: > | ||
cmake -S "${GITHUB_WORKSPACE}"/kokkos -B "${GITHUB_WORKSPACE}"/build-kokkos | ||
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}"/install-kokkos | ||
-DCMAKE_CXX_COMPILER="${GITHUB_WORKSPACE}"/kokkos/bin/nvcc_wrapper | ||
-DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
-DKokkos_ENABLE_CUDA=ON | ||
-DKokkos_ARCH_AMPERE80=ON | ||
-DKokkos_ENABLE_COMPILER_WARNINGS=ON | ||
cwpearson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Build & Install Kokkos | ||
run: cmake --build "${GITHUB_WORKSPACE}"/build-kokkos --config RelWithDebInfo --parallel 2 --target install | ||
|
||
- name: Configure and Build Exercises | ||
run: | | ||
bash "${GITHUB_WORKSPACE}"/kokkos-tutorials/Scripts/ci-configure-build-test.sh \ | ||
"${GITHUB_WORKSPACE}"/install-kokkos/lib/cmake/Kokkos \ | ||
"${GITHUB_WORKSPACE}"/kokkos-tutorials \ | ||
"${GITHUB_WORKSPACE}"/kokkos/bin/nvcc_wrapper \ | ||
RelWithDebInfo \ | ||
CUDA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Hosted Runners (unix) | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
cpp_compiler: g++ | ||
build_type: RelWithDebInfo | ||
backend: OPENMP | ||
- os: macos-latest | ||
cpp_compiler: clang++ | ||
build_type: Debug | ||
backend: THREADS | ||
|
||
steps: | ||
- name: Checkout Kokkos Tutorials | ||
uses: actions/checkout@v4 | ||
with: | ||
path: kokkos-tutorials | ||
|
||
- name: Checkout Kokkos | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'kokkos/kokkos' | ||
ref: master | ||
path: kokkos | ||
|
||
- name: Configure Kokkos | ||
run: > | ||
cmake -S ${{ github.workspace}}/kokkos -B ${{ github.workspace}}/build-kokkos | ||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace}}/install-kokkos | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-DKokkos_ENABLE_COMPILER_WARNINGS=ON | ||
|
||
- name: Build & Install Kokkos | ||
run: cmake --build ${{ github.workspace}}/build-kokkos --config ${{ matrix.build_type }} --parallel 2 --target install | ||
|
||
- name: Configure and Build Exercises | ||
run: | | ||
bash ${{ github.workspace}}/kokkos-tutorials/Scripts/ci-configure-build-test.sh \ | ||
${{ github.workspace}}/install-kokkos/lib/cmake/Kokkos \ | ||
${{ github.workspace}}/kokkos-tutorials \ | ||
${{ matrix.cpp_compiler}} \ | ||
${{ matrix.build_type}} \ | ||
${{ matrix.backend }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Hosted Runners (windows) | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: windows-latest | ||
cpp_compiler: cl | ||
build_type: Release | ||
backend: SERIAL | ||
|
||
steps: | ||
- name: Checkout Kokkos Tutorials | ||
uses: actions/checkout@v4 | ||
with: | ||
path: kokkos-tutorials | ||
|
||
- name: Checkout Kokkos | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'kokkos/kokkos' | ||
ref: master | ||
path: kokkos | ||
|
||
- name: Configure Kokkos | ||
run: > | ||
cmake -S ${{ github.workspace}}\kokkos -B ${{ github.workspace}}\build-kokkos | ||
dalg24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace}}\install-kokkos | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
|
||
- name: Build & Install Kokkos | ||
run: cmake --build ${{ github.workspace}}\build-kokkos --config ${{ matrix.build_type }} --parallel 2 --target install | ||
|
||
- name: Configure and Build Exercises | ||
run: | | ||
${{ github.workspace}}\kokkos-tutorials\Scripts\ci-configure-build-test.bat ^ | ||
${{ github.workspace}}\install-kokkos\lib\cmake\Kokkos ^ | ||
${{ github.workspace}}\kokkos-tutorials ^ | ||
${{ matrix.cpp_compiler}} ^ | ||
${{ matrix.build_type}} ^ | ||
${{ matrix.backend }} | ||
shell: cmd | ||
|
cwpearson marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@echo off | ||
setlocal EnableDelayedExpansion | ||
|
||
if "%~5"=="" ( | ||
echo Usage: build.bat kokkos_root tutorials_src cpp_compiler build_type backend | ||
exit /b 1 | ||
) | ||
|
||
set kokkos_root=%~1 | ||
set tutorials_src=%~2 | ||
set cpp_compiler=%~3 | ||
set build_type=%~4 | ||
set backend=%~5 | ||
|
||
set "EXERCISES=01 02 03" | ||
if "%backend%"=="CUDA" set "EXERCISES=%EXERCISES% 04" | ||
|
||
set Kokkos_ROOT=%kokkos_root% | ||
mkdir build 2>nul | ||
|
||
for %%e in (%EXERCISES%) do ( | ||
for %%k in (Begin Solution) do ( | ||
set "source_dir=%tutorials_src%\Exercises\%%e\%%k" | ||
set "build_dir=build\Exercises\%%e\%%k" | ||
echo building !source_dir! | ||
cmake -S "!source_dir!" -B "!build_dir!" ^ | ||
-DCMAKE_CXX_COMPILER="%cpp_compiler%" ^ | ||
-DCMAKE_BUILD_TYPE="%build_type%" | ||
|
||
cmake --build "!build_dir!" --config "%build_type%" | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#! /bin/bash | ||
|
||
set -eou pipefail | ||
|
||
kokkos_root="$1" | ||
tutorials_src="$2" | ||
cpp_compiler="$3" | ||
build_type="$4" | ||
backend="$5" | ||
|
||
EXERCISES=( | ||
01 | ||
02 | ||
03 | ||
) | ||
|
||
# Add CUDA exercise when backend is CUDA | ||
if [ "$backend" == CUDA ]; then | ||
EXERCISES+=(04) | ||
fi | ||
|
||
export Kokkos_ROOT="$kokkos_root" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we handle Kokkos and KokkosKernels differently and why don't we just set these environment variable externally? |
||
mkdir -p build | ||
for e in "${EXERCISES[@]}"; do | ||
for k in Begin Solution; do | ||
source_dir="$tutorials_src"/Exercises/"$e"/"$k" | ||
build_dir=build/Exercises/"$e"/"$k" | ||
echo building "$source_dir" | ||
cmake -S "$source_dir" -B "$build_dir" \ | ||
-DCMAKE_CXX_COMPILER="$cpp_compiler" \ | ||
-DCMAKE_BUILD_TYPE="$build_type" | ||
|
||
# --config needed for windows | ||
cmake --build "$build_dir" --config "$build_type" | ||
done | ||
done |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine but noting that it is the default hence unnecessary