[nvfp4_training] Support NVFP4 GroupedExperts on Blackwell #27504
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: Run Regression Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'gh/**' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'gh/**' | |
| concurrency: | |
| group: regression_test-${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| jobs: | |
| test-nightly: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: CUDA Nightly | |
| runs-on: linux.g5.12xlarge.nvidia.gpu | |
| torch-spec: '--pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu126' | |
| gpu-arch-type: "cuda" | |
| gpu-arch-version: "12.6" | |
| compiler: "" | |
| - name: CPU Nightly | |
| runs-on: linux.4xlarge | |
| torch-spec: '--pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu' | |
| gpu-arch-type: "cpu" | |
| gpu-arch-version: "" | |
| compiler: "" | |
| - name: CPU Nightly (Clang) | |
| runs-on: linux.4xlarge | |
| torch-spec: '--pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu' | |
| gpu-arch-type: "cpu" | |
| gpu-arch-version: "" | |
| compiler: "clang" | |
| permissions: | |
| id-token: write | |
| contents: read | |
| uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main | |
| with: | |
| timeout: 180 | |
| runner: ${{ matrix.runs-on }} | |
| gpu-arch-type: ${{ matrix.gpu-arch-type }} | |
| gpu-arch-version: ${{ matrix.gpu-arch-version }} | |
| submodules: recursive | |
| script: | | |
| if [ "${{ matrix.compiler }}" = "clang" ]; then | |
| # Install clang from the system package manager. The docker image's | |
| # bundled conda has a broken menuinst plugin that rejects -c conda-forge, | |
| # so we cannot install clangxx via conda here. | |
| dnf install -y clang | |
| clang --version | |
| conda create -n venv python=3.10 libgcc-ng=11.2.0 libstdcxx-ng=11.2.0 -y | |
| conda activate venv | |
| export CC=clang | |
| export CXX=clang++ | |
| # distutils (used by setup.py via cpp_extension.BuildExtension) reads | |
| # CFLAGS from the env and applies it to both C and C++ compiles. | |
| # It does NOT honor CXXFLAGS — that is a Make convention, not distutils. | |
| export CFLAGS="-Werror -Wno-vla-cxx-extension" | |
| # Compile the x86 CPU aten_kernels — they are off by default | |
| # in setup.py and not otherwise exercised by any OSS CI job. | |
| export USE_CPU_KERNELS=1 | |
| else | |
| conda create -n venv python=3.10 libgcc-ng=11.2.0 libstdcxx-ng=11.2.0 -y | |
| conda activate venv | |
| fi | |
| python -m pip install --upgrade pip | |
| pip install ${{ matrix.torch-spec }} | |
| pip install -r dev-requirements.txt | |
| pip install . --no-build-isolation | |
| export CONDA=$(dirname $(dirname $(which conda))) | |
| export LD_LIBRARY_PATH=$CONDA/lib/:$LD_LIBRARY_PATH | |
| # PT2E tests (test/quantization/pt2e) are intentionally excluded here. | |
| # They are slow (~40+ min, dominated by torch.compile / Inductor codegen) | |
| # and are CPU/x86-centric, so running them on every regression leg -- and | |
| # especially on the expensive GPU runner -- is wasteful and largely | |
| # redundant. They now run in dedicated workflows instead: | |
| # - regression_test_pt2e_cpu.yml (full PT2E suite on CPU) | |
| # - regression_test_pt2e_gpu.yml (GPU-relevant PT2E, slow x86 tests excluded) | |
| pytest test --verbose -s --ignore=test/quantization/pt2e | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: CUDA 2.13 | |
| runs-on: linux.g5.12xlarge.nvidia.gpu | |
| torch-spec: 'torch==2.13.0 torchvision==0.28.0 --index-url https://download.pytorch.org/whl/cu126' | |
| gpu-arch-type: "cuda" | |
| gpu-arch-version: "12.6" | |
| dev-requirements-overrides: "" | |
| - name: CPU 2.13 | |
| runs-on: linux.4xlarge | |
| torch-spec: 'torch==2.13.0 torchvision==0.28.0 --index-url https://download.pytorch.org/whl/cpu' | |
| gpu-arch-type: "cpu" | |
| gpu-arch-version: "" | |
| dev-requirements-overrides: "" | |
| uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main | |
| with: | |
| timeout: 180 | |
| runner: ${{ matrix.runs-on }} | |
| gpu-arch-type: ${{ matrix.gpu-arch-type }} | |
| gpu-arch-version: ${{ matrix.gpu-arch-version }} | |
| submodules: recursive | |
| script: | | |
| conda create -n venv python=3.10 libgcc-ng=11.2.0 libstdcxx-ng=11.2.0 -y | |
| conda activate venv | |
| python -m pip install --upgrade pip | |
| pip install ${{ matrix.torch-spec }} | |
| sed -i '${{ matrix.dev-requirements-overrides }}' dev-requirements.txt | |
| pip install -r dev-requirements.txt | |
| pip install . --no-build-isolation | |
| export CONDA=$(dirname $(dirname $(which conda))) | |
| export LD_LIBRARY_PATH=$CONDA/lib/:$LD_LIBRARY_PATH | |
| # PT2E tests (test/quantization/pt2e) are intentionally excluded here. | |
| # They are slow (~40+ min, dominated by torch.compile / Inductor codegen) | |
| # and are CPU/x86-centric, so running them on every regression leg -- and | |
| # especially on the expensive GPU runner -- is wasteful and largely | |
| # redundant. They now run in dedicated workflows instead: | |
| # - regression_test_pt2e_cpu.yml (full PT2E suite on CPU) | |
| # - regression_test_pt2e_gpu.yml (GPU-relevant PT2E, slow x86 tests excluded) | |
| pytest test --verbose -s --ignore=test/quantization/pt2e |