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

Add compute-sanitizer github workflow action to nightly tests #12800

Merged
merged 20 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 8 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
12 changes: 12 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ jobs:
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
conda-cpp-memcheck-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
node_type: "gpu-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/test_cpp_memcheck.sh"
conda-python-cudf-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
Expand Down
30 changes: 1 addition & 29 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,7 @@
#!/bin/bash
# Copyright (c) 2022-2023, NVIDIA CORPORATION.

set -euo pipefail

. /opt/conda/etc/profile.d/conda.sh

rapids-logger "Generate C++ testing dependencies"
rapids-dependency-file-generator \
--output conda \
--file_key test_cpp \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n test

# Temporarily allow unbound variables for conda activation.
set +u
conda activate test
set -u

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"

rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
libcudf libcudf_kafka libcudf-tests

rapids-logger "Check GPU usage"
nvidia-smi
source "$(dirname "$0")/test_cpp_common.sh"
davidwendt marked this conversation as resolved.
Show resolved Hide resolved

EXITCODE=0
trap "EXITCODE=1" ERR
Expand Down
32 changes: 32 additions & 0 deletions ci/test_cpp_common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# Copyright (c) 2022-2023, NVIDIA CORPORATION.

set -euo pipefail

. /opt/conda/etc/profile.d/conda.sh

rapids-logger "Generate C++ testing dependencies"
rapids-dependency-file-generator \
--output conda \
--file_key test_cpp \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n test

# Temporarily allow unbound variables for conda activation.
set +u
conda activate test
set -u

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"

rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
libcudf libcudf_kafka libcudf-tests

rapids-logger "Check GPU usage"
nvidia-smi
30 changes: 30 additions & 0 deletions ci/test_cpp_memcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.

source "$(dirname "$0")/test_cpp_common.sh"
vyasr marked this conversation as resolved.
Show resolved Hide resolved

EXITCODE=0
trap "EXITCODE=1" ERR
set +e

# Run gtests with compute-sanitizer
rapids-logger "Memcheck gtests with rmm_mode=cuda"
export GTEST_CUDF_RMM_MODE=cuda
COMPUTE_SANITIZER_CMD="compute-sanitizer --tool memcheck"
for gt in "$CONDA_PREFIX"/bin/gtests/{libcudf,libcudf_kafka}/* ; do
test_name=$(basename ${gt})
if [[ "$test_name" == "ERROR_TEST" ]]; then
continue
fi
if [[ "$test_name" == "STREAM_IDENTIFICATION_TEST" ]]; then
continue
fi
davidwendt marked this conversation as resolved.
Show resolved Hide resolved
echo "Running gtest $test_name"
echo "${COMPUTE_SANITIZER_CMD} ${gt} --gtest_output=xml:${RAPIDS_TESTS_DIR}${test_name}.xml"
davidwendt marked this conversation as resolved.
Show resolved Hide resolved
${gt} --gtest_output=xml:"${RAPIDS_TESTS_DIR}${test_name}.xml"
done
unset GTEST_CUDF_RMM_MODE
# TODO: test-results/*.cs.log are processed in CI

rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies:
- cmake>=3.23.1,!=3.25.0
- cubinlinker
- cuda-python>=11.7.1,<12.0
- cuda-sanitizer-api=11.8.86
- cudatoolkit=11.8
- cupy>=9.5.0,<12.0.0a0
- cxx-compiler
Expand Down
12 changes: 12 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ files:
- notebooks
- py_version
- run
- test_cpp
- test_python
test_cpp:
output: none
includes:
- cudatoolkit
- libidentify_stream_usage_build
- test_cpp
test_python:
output: none
includes:
Expand Down Expand Up @@ -266,6 +268,16 @@ dependencies:
arch: aarch64
packages:
- cupy-cuda11x -f https://pip.cupy.dev/aarch64 # TODO: Verify that this works.
test_cpp:
specific:
- output_types: conda
matrices:
- matrix:
cuda: "11.8"
packages:
- cuda-sanitizer-api=11.8.86
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved
vyasr marked this conversation as resolved.
Show resolved Hide resolved
- matrix:
packages:
test_java:
common:
- output_types: conda
Expand Down