Skip to content

Commit

Permalink
chore: enabling torchscript core testing in GHA
Browse files Browse the repository at this point in the history
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed Sep 9, 2023
1 parent c377c48 commit 9ad557b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
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

0 comments on commit 9ad557b

Please sign in to comment.