Skip to content
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

chore: enabling torchscript core testing in GHA #2303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
32 changes: 32 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,38 @@ jobs:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

tests-py-torchscript-core:
name: Test torchscript core [c++]
needs: [generate-matrix, build]
strategy:
fail-fast: false
matrix:
include:
- repository: pytorch/tensorrt
package-name: torch_tensorrt
pre-script: packaging/pre_build_script.sh
uses: pytorch/tensorrt/.github/workflows/linux-test.yml@main
with:
job-name: tests-py-torchscript-core
repository: "pytorch/tensorrt"
ref: ""
test-infra-repository: pytorch/test-infra
test-infra-ref: main
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
script: |
export USE_HOST_DEPS=1
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
pushd .
cd tests/modules
${CONDA_RUN} python -m pip install --pre -r requirements.txt --use-deprecated=legacy-resolver
${CONDA_RUN} python hub.py
popd
export TORCHTRT_PATH=$(python -c "import os, torch_tensorrt; print(os.path.dirname(torch_tensorrt.__file__))")
cat toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel.tmpl | envsubst > WORKSPACE
export LD_LIBRARY_PATH=$(pwd)/bazel-tensorrt/external/cudnn/lib/:$(pwd)/bazel-tensorrt/external/tensorrt/lib/:$(pwd)/bazel-tensorrt/external/libtorch_pre_cxx11_abi/lib:${CUDA_HOME}/lib64/:$LD_LIBRARY_PATH
bazel test //tests --jobs=4 --platforms=//toolchains:ci_rhel_x86_64_linux --test_arg=--gtest_output=xml:${RUNNER_TEST_RESULTS_DIR} --config ci_testing --config pre_cxx11_abi --noshow_progress --test_timeout=20000

tests-py-torchscript-fe:
name: Test torchscript frontend [Python]
needs: [generate-matrix, build]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ http_archive(
# External dependency for torch_tensorrt if you already have precompiled binaries.
local_repository(
name = "torch_tensorrt",
path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch_tensorrt"
path = "${TORCHTRT_PATH}"
)

# CUDA should be installed on the system locally
Expand Down