Check CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED #132
Workflow file for this run
This file contains hidden or 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
| name: test-paddle | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test-paddle: | |
| name: Test Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libnuma-dev gcc g++ make | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| tf_ver=4.52 | |
| npy_ver=2.2 | |
| torch_ver=2.7 | |
| if [ "${{ matrix.python-version }}" = "3.9" ]; then | |
| npy_ver=1.26 | |
| tf_ver=4.40 | |
| torch_ver=2.1 | |
| elif [ "${{ matrix.python-version }}" = "3.10" ]; then | |
| torch_ver=2.3 | |
| elif [ "${{ matrix.python-version }}" = "3.11" ]; then | |
| torch_ver=2.5 | |
| elif [ "${{ matrix.python-version }}" = "3.12" ]; then | |
| torch_ver=2.6 | |
| fi | |
| pip install torch==${torch_ver} --index-url https://download.pytorch.org/whl/cpu # transformers requires torch | |
| pip install paddlepaddle==3.0.0 | |
| # TOFIX: safetensors version (0.7.0 had a bug around fp8 in Dec 5 2025) | |
| pip install pytest pytest-cov setuptools_scm safetensors==0.6.2 transformers==${tf_ver} numpy==${npy_ver} | |
| - name: Build Package | |
| run: | | |
| pip install . | |
| - name: Run tests | |
| run: | | |
| cd tests | |
| LIBDIR=`python3 -c "import os; os.chdir('/tmp'); import fastsafetensors; print(os.path.dirname(fastsafetensors.__file__))"` | |
| mkdir -p /tmp/pytest-log | |
| export TEST_FASTSAFETENSORS_FRAMEWORK=paddle | |
| COVERAGE_FILE=.coverage_0 pytest -s --cov=${LIBDIR} test_fastsafetensors.py > /tmp/pytest-log/0.log 2>&1 | |
| COVERAGE_FILE=.coverage_1 WORLD_SIZE=2 python3 -m paddle.distributed.launch --nnodes 2 --master 127.0.0.1:1234 --rank 0 test_multi.py --cov=${LIBDIR} -s test_multi.py > /tmp/pytest-log/1.log 2>&1 & \ | |
| COVERAGE_FILE=.coverage_2 WORLD_SIZE=2 python3 -m paddle.distributed.launch --nnodes 2 --master 127.0.0.1:1234 --rank 1 test_multi.py --cov=${LIBDIR} -s test_multi.py > /tmp/pytest-log/2.log 2>&1 && \ | |
| coverage combine .coverage_* | |
| coverage html | |
| mv htmlcov /tmp/pytest-log | |
| - name: upload pytest log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pytest-log-paddle-${{ matrix.python-version }} | |
| path: /tmp/pytest-log |