-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathtest_python.sh
More file actions
executable file
·32 lines (20 loc) · 1.12 KB
/
test_python.sh
File metadata and controls
executable file
·32 lines (20 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -euo pipefail
source "$(dirname "$0")/build_common.sh"
print_environment_details
fail_if_no_gpu
readonly prefix="${BUILD_DIR}/python/"
export PYTHONPATH="${prefix}:${PYTHONPATH:-}"
pushd ../python/cuda_cooperative >/dev/null
run_command "⚙️ Pip install cuda_cooperative" pip install --force-reinstall --upgrade --target "${prefix}" .[test]
run_command "🚀 Pytest cuda_cooperative" python -m pytest -v ./tests
popd >/dev/null
pushd ../python/cuda_parallel >/dev/null
# Temporarily install the package twice to populate include directory as part of the first installation
# and to let manifest discover these includes during the second installation. Do not forget to remove the
# second installation after https://github.com/NVIDIA/cccl/issues/2281 is addressed.
run_command "⚙️ Pip install cuda_parallel once" pip install --force-reinstall --upgrade --target "${prefix}" .[test]
run_command "⚙️ Pip install cuda_parallel twice" pip install --force-reinstall --upgrade --target "${prefix}" .[test]
run_command "🚀 Pytest cuda_parallel" python -m pytest -v ./tests
popd >/dev/null
print_time_summary