Skip to content

Commit

Permalink
Add a nvrtc configuration to the libcu++ build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Jul 11, 2023
1 parent 25b7a06 commit cc12a71
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 10 deletions.
36 changes: 27 additions & 9 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
uses: ./.github/workflows/dispatch-build-and-test.yml
strategy:
fail-fast: false
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
compiler: ${{ fromJSON(needs.compute-matrix.outputs.COMPILERS) }}
with:
per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }}
Expand All @@ -44,36 +44,54 @@ jobs:
uses: ./.github/workflows/dispatch-build-and-test.yml
strategy:
fail-fast: false
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
compiler: ${{ fromJSON(needs.compute-matrix.outputs.COMPILERS) }}
with:
per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }}
build_script: "./ci/build_cub.sh"
test_script: "./ci/test_cub.sh"

libcudacxx:
name: libcudacxx CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }}
needs: compute-matrix
uses: ./.github/workflows/dispatch-build-and-test.yml
strategy:
fail-fast: false
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
compiler: ${{ fromJSON(needs.compute-matrix.outputs.COMPILERS) }}
with:
per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }}
build_script: "./ci/build_libcudacxx.sh"
test_script: "./ci/test_libcudacxx.sh"
test_script: "./ci/test_libcudacxx.sh"

nvrtc:
name: libcudacxx nvrtc
needs: compute-matrix
uses: ./.github/workflows/dispatch-build-and-test.yml
strategy:
fail-fast: false
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
compiler: ${{ fromJSON(needs.compute-matrix.outputs.COMPILERS) }}
exclude:
- cuda_version: "11.1"
- compiler: clang
with:
per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }}
build_script: "./ci/build_libcudacxx_nvrtc.sh"
test_script: "./ci/test_libcudacxx_nvrtc.sh"

# This job is the final job that runs after all other jobs and is used for branch protection status checks.
# See: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks
ci:
runs-on: ubuntu-latest
name: CI
needs:
- libcudacxx
- cub
- libcudacxx
- nvrtc
- thrust
steps:
- run: echo "CI success"
17 changes: 17 additions & 0 deletions ci/build_libcudacxx_nvrtc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

source "$(dirname "$0")/build_common.sh"

CMAKE_OPTIONS="
-DCCCL_ENABLE_THRUST=OFF \
-DCCCL_ENABLE_LIBCUDACXX=ON \
-DCCCL_ENABLE_CUB=OFF \
-DCCCL_ENABLE_TESTING=OFF \
-DLIBCUDACXX_ENABLE_LIBCUDACXX_TESTS=ON \
-DLIBCUDACXX_TEST_WITH_NVRTC=ON \
"
configure "$CMAKE_OPTIONS"

source "./sccache_stats.sh" "start"
LIBCUDACXX_SITE_CONFIG="${BUILD_DIR}/libcudacxx/test/lit.site.cfg" lit -v --no-progress-bar -Dexecutor="NoopExecutor()" -Dcompute_archs=${GPU_ARCHS} -Dstd="c++${CXX_STANDARD}" ../libcudacxx/.upstream-tests/test
source "./sccache_stats.sh" "end"
19 changes: 19 additions & 0 deletions ci/test_libcudacxx_nvrtc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

source "$(dirname "$0")/build_common.sh"

CMAKE_OPTIONS="
-DCCCL_ENABLE_THRUST=OFF \
-DCCCL_ENABLE_LIBCUDACXX=ON \
-DCCCL_ENABLE_CUB=OFF \
-DCCCL_ENABLE_TESTING=OFF \
-DLIBCUDACXX_ENABLE_LIBCUDACXX_TESTS=ON \
-DLIBCUDACXX_TEST_WITH_NVRTC=ON \
"
configure "$CMAKE_OPTIONS"

readonly TEST_PARALLEL_LEVEL=8

source "./sccache_stats.sh" "start"
LIBCUDACXX_SITE_CONFIG="${BUILD_DIR}/libcudacxx/test/lit.site.cfg" lit -v -j ${TEST_PARALLEL_LEVEL} --no-progress-bar -Dcompute_archs=${GPU_ARCHS} -Dstd="c++${CXX_STANDARD}" ../libcudacxx/.upstream-tests/test
source "./sccache_stats.sh" "end"
2 changes: 1 addition & 1 deletion libcudacxx/.upstream-tests/utils/libcudacxx/test/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def configure_no_execute(self):
def configure_ccache(self):
use_ccache_default = os.environ.get('CMAKE_CUDA_COMPILER_LAUNCHER') is not None
use_ccache = self.get_lit_bool('use_ccache', use_ccache_default)
if use_ccache:
if use_ccache and not self.cxx.is_nvrtc:
self.cxx.use_ccache = True
self.lit_config.note('enabling ccache')

Expand Down

0 comments on commit cc12a71

Please sign in to comment.