Skip to content

[Draft] Interstate assignment to map #4702

[Draft] Interstate assignment to map

[Draft] Interstate assignment to map #4702

Workflow file for this run

name: GPU Tests
on:
push:
branches: [ main, ci-fix ]
pull_request:
branches: [ main, ci-fix ]
merge_group:
branches: [ main, ci-fix ]
env:
CUDACXX: /usr/local/cuda/bin/nvcc
MKLROOT: /opt/intel/oneapi/mkl/latest/
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
test-gpu:
if: "!contains(github.event.pull_request.labels.*.name, 'no-ci')"
runs-on: [self-hosted, gpu]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: |
rm -f ~/.dace.conf
rm -rf .dacecache tests/.dacecache
python -m venv ~/.venv # create venv so we can use pip
source ~/.venv/bin/activate # activate venv
python -m pip install --upgrade pip
pip install flake8 pytest-xdist coverage
pip install mpi4py
pip install cupy
pip uninstall -y dace
pip install -e ".[testing]"
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
- name: Test dependencies
run: |
source ~/.venv/bin/activate # activate venv
nvidia-smi
- name: Run pytest GPU
run: |
source ~/.venv/bin/activate # activate venv
export DACE_cache=single
export PATH=$PATH:/usr/local/cuda/bin # some test is calling cuobjdump, so it needs to be in path
echo "CUDACXX: $CUDACXX"
pytest --cov-report=xml --cov=dace --tb=short -m "gpu"
- name: Run extra GPU tests
run: |
source ~/.venv/bin/activate # activate venv
export NOSTATUSBAR=1
export DACE_cache=single
export COVERAGE_RCFILE=`pwd`/.coveragerc
export PYTHON_BINARY="coverage run --source=dace --parallel-mode"
./tests/cuda_test.sh
- name: Report overall coverage
run: |
source ~/.venv/bin/activate # activate venv
export COVERAGE_RCFILE=`pwd`/.coveragerc
coverage combine . */; coverage report; coverage xml
reachable=0
ping -W 2 -c 1 codecov.io || reachable=$?
if [ $reachable -eq 0 ]; then
./codecov
else
echo "Codecov.io is unreachable"
fi