Skip to content

a few CI changes #3612

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

Merged
merged 8 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 6 additions & 2 deletions .github/scripts/install-cuda-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ install_cuda_aarch64() {
echo "install cuda ${CU_VERSION}"
# CU_VERSION: cu128 --> CU_VER: 12-8
CU_VER=${CU_VERSION:2:2}-${CU_VERSION:4:1}
# CU_VERSION: cu129 --> CU_DOT_VER: 12.9
CU_DOT_VER=${CU_VERSION:2:2}.${CU_VERSION:4:1}
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo
# nccl version must match libtorch_cuda.so was built with https://github.com/pytorch/pytorch/blob/main/.ci/docker/ci_commit_pins/nccl-cu12.txt
dnf -y install cuda-compiler-${CU_VER}.aarch64 \
cuda-libraries-${CU_VER}.aarch64 \
cuda-libraries-devel-${CU_VER}.aarch64
cuda-libraries-devel-${CU_VER}.aarch64 \
libnccl-2.27.3-1+cuda${CU_DOT_VER} libnccl-devel-2.27.3-1+cuda${CU_DOT_VER} libnccl-static-2.27.3-1+cuda${CU_DOT_VER}
dnf clean all
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/lib64:$LD_LIBRARY_PATH
ls -lart /usr/local/
nvcc --version
echo "cuda ${CU_VER} installed successfully"
Expand Down
8 changes: 6 additions & 2 deletions .github/scripts/install-torch-tensorrt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -x

TORCH=$(grep "^torch>" ${PWD}/py/requirements.txt)
TORCHVISION=$(grep "^torchvision" ${PWD}/py/requirements.txt)
TORCHVISION=$(grep "^torchvision>" ${PWD}/tests/py/requirements.txt)
INDEX_URL=https://download.pytorch.org/whl/${CHANNEL}/${CU_VERSION}
PLATFORM=$(python -c "import sys; print(sys.platform)")

Expand All @@ -14,8 +14,12 @@ fi

# Install all the dependencies required for Torch-TensorRT
pip install --pre -r ${PWD}/tests/py/requirements.txt
# dependencies in the tests/py/requirements.txt might install a different version of torch or torchvision
# eg. timm will install the latest torchvision, however we want to use the torchvision from nightly
# reinstall torch torchvisionto make sure we have the correct version
pip uninstall -y torch torchvision
pip install --force-reinstall --pre ${TORCHVISION} --index-url ${INDEX_URL} --no-deps
pip install --force-reinstall --pre ${TORCH} --index-url ${INDEX_URL}
pip install --force-reinstall --pre ${TORCHVISION} --index-url ${INDEX_URL}


# Install Torch-TensorRT
Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/build-test-linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,7 @@ jobs:
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
cd tests/py
major=${PYTHON_VERSION%%.*}
minor=${PYTHON_VERSION#*.}
minor=${minor%%.*}
if (( major > 3 || (major == 3 && minor >= 13) )); then
echo "flashinfer-python is not supported for python version 3.13 or higher"
else
echo "Installing flashinfer-python"
# flashinfer-python is broken on python 3.9 at the moment, so we skip it for now
if (major == 3 && minor == 9); then
echo "Skipping flashinfer-python for python 3.9"
else
python -m pip install flashinfer-python --no-deps
fi
fi
cd dynamo
cd tests/py/dynamo
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml -n 4 conversion/
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin.py
python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin_with_attrs.py
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-test-tensorrt-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
build-matrix: ${{ needs.generate-tensorrt-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
Expand Down Expand Up @@ -130,6 +131,7 @@ jobs:
build-matrix: ${{ needs.generate-tensorrt-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -160,6 +162,7 @@ jobs:
build-matrix: ${{ needs.generate-tensorrt-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -190,6 +193,7 @@ jobs:
build-matrix: ${{ needs.generate-tensorrt-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -220,6 +224,7 @@ jobs:
build-matrix: ${{ needs.generate-tensorrt-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -252,6 +257,7 @@ jobs:
build-matrix: ${{ needs.generate-tensorrt-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -284,6 +290,7 @@ jobs:
build-matrix: ${{ needs.generate-tensorrt-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -316,6 +323,7 @@ jobs:
build-matrix: ${{ needs.generate-tensorrt-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-test-tensorrt-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ jobs:
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -133,6 +134,7 @@ jobs:
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -160,6 +162,7 @@ jobs:
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -187,6 +190,7 @@ jobs:
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -214,6 +218,7 @@ jobs:
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -243,6 +248,7 @@ jobs:
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -272,6 +278,7 @@ jobs:
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down Expand Up @@ -300,6 +307,7 @@ jobs:
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
set -euo pipefail
export USE_HOST_DEPS=1
export CI_BUILD=1
pushd .
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ on:
description: "Prevents a job from failing when a step fails. Set to true to allow a job to pass when exec script step fails."
default: false
type: boolean

architecture:
description: 'CPU architecture to build for'
default: "x64"
type: string
jobs:
test:
strategy:
Expand Down Expand Up @@ -107,7 +110,7 @@ jobs:
if: ${{ matrix.tensorrt == '' }}
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}${{ inputs.architecture }}
path: ${{ runner.temp }}/artifacts/
- name: Download artifacts
if: ${{ matrix.tensorrt != '' }}
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ http_archive(
name = "libtorch",
build_file = "@//third_party/libtorch:BUILD",
strip_prefix = "libtorch",
urls = ["https://download.pytorch.org/libtorch/nightly/cu128/libtorch-cxx11-abi-shared-with-deps-latest.zip"],
urls = ["https://download.pytorch.org/libtorch/nightly/cu128/libtorch-shared-with-deps-latest.zip"],
)

# in aarch64 platform you can get libtorch via either local or wheel file
Expand Down
8 changes: 0 additions & 8 deletions packaging/pre_build_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ if [[ ${TENSORRT_VERSION} != "" ]]; then
pyproject.toml
fi

if [[ "${CU_VERSION::4}" < "cu12" ]]; then
# replace dependencies from tensorrt-cu12-bindings/libs to tensorrt-cu11-bindings/libs
sed -i -e "s/tensorrt-cu12/tensorrt-${CU_VERSION::4}/g" \
-e "s/tensorrt-cu12-bindings/tensorrt-${CU_VERSION::4}-bindings/g" \
-e "s/tensorrt-cu12-libs/tensorrt-${CU_VERSION::4}-libs/g" \
pyproject.toml
fi

cat toolchains/ci_workspaces/MODULE.bazel.tmpl | envsubst > MODULE.bazel

if [[ ${TENSORRT_VERSION} != "" ]]; then
Expand Down
8 changes: 0 additions & 8 deletions packaging/pre_build_script_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ if [[ ${TENSORRT_VERSION} != "" ]]; then
pyproject.toml
fi

if [[ "${CU_VERSION::4}" < "cu12" ]]; then
# replace dependencies from tensorrt-cu12-bindings/libs to tensorrt-cu11-bindings/libs
sed -i -e "s/tensorrt-cu12/tensorrt-${CU_VERSION::4}/g" \
-e "s/tensorrt-cu12-bindings/tensorrt-${CU_VERSION::4}-bindings/g" \
-e "s/tensorrt-cu12-libs/tensorrt-${CU_VERSION::4}-libs/g" \
pyproject.toml
fi

TORCH=$(grep "^torch>" py/requirements.txt)
INDEX_URL=https://download.pytorch.org/whl/${CHANNEL}/${CU_VERSION}

Expand Down
3 changes: 1 addition & 2 deletions py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
numpy
packaging
pybind11==2.6.2
--extra-index-url https://download.pytorch.org/whl/nightly/cu128
--extra-index-url https://download.pytorch.org/whl/nightly/cu129
torch>=2.8.0.dev,<2.9.0
torchvision>=0.22.0.dev,<0.23.0
--extra-index-url https://pypi.ngc.nvidia.com
pyyaml
dllist
11 changes: 8 additions & 3 deletions tests/py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ parameterized>=0.2.0
pytest>=8.2.1
pytest-xdist>=3.6.1
pyyaml
timm>=1.0.3
transformers==4.49.0
nvidia-modelopt[all]~=0.27.0; python_version >'3.9' and python_version <'3.13'
--extra-index-url https://pypi.nvidia.com
nvidia-modelopt[all]; python_version >'3.9' and python_version <'3.13'
--extra-index-url https://pypi.nvidia.com
# flashinfer-python is not supported for python version 3.13 or higher
# flashinfer-python is broken on python 3.9 at the moment, so skip it for now
flashinfer-python; python_version >'3.9' and python_version <'3.13'
--extra-index-url https://download.pytorch.org/whl/nightly/cu129
torchvision>=0.23.0.dev,<0.24.0
timm>=1.0.3
2 changes: 1 addition & 1 deletion toolchains/ci_workspaces/MODULE.bazel.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "ht
# name = "libtorch",
# build_file = "@//third_party/libtorch:BUILD",
# strip_prefix = "libtorch",
# urls = ["https://download.pytorch.org/libtorch/${CHANNEL}/${CU_VERSION}/libtorch-cxx11-abi-shared-with-deps-latest.zip"],
# urls = ["https://download.pytorch.org/libtorch/${CHANNEL}/${CU_VERSION}/libtorch-shared-with-deps-latest.zip"],
#)

# Download these tarballs manually from the NVIDIA website
Expand Down
Loading