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 8, 2023
1 parent c377c48 commit 30e2a8c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
42 changes: 37 additions & 5 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-${{ needs.generate-matrix.outputs.matrix.python_version }}
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 All @@ -66,7 +98,7 @@ jobs:
pre-script: packaging/pre_build_script.sh
uses: pytorch/tensorrt/.github/workflows/linux-test.yml@main
with:
job-name: tests-py-torchscript-fe
job-name: tests-py-torchscript-fe-${{ needs.generate-matrix.outputs.matrix.python_version }}
repository: "pytorch/tensorrt"
ref: ""
test-infra-repository: pytorch/test-infra
Expand Down Expand Up @@ -101,7 +133,7 @@ jobs:
pre-script: packaging/pre_build_script.sh
uses: pytorch/tensorrt/.github/workflows/linux-test.yml@main
with:
job-name: tests-py-dynamo-converters
job-name: tests-py-dynamo-converters-${{ needs.generate-matrix.outputs.matrix.python_version }}
repository: "pytorch/tensorrt"
ref: ""
test-infra-repository: pytorch/test-infra
Expand All @@ -128,7 +160,7 @@ jobs:
pre-script: packaging/pre_build_script.sh
uses: pytorch/tensorrt/.github/workflows/linux-test.yml@main
with:
job-name: tests-py-dynamo-fe
job-name: tests-py-dynamo-fe-${{ needs.generate-matrix.outputs.matrix.python_version }}
repository: "pytorch/tensorrt"
ref: ""
test-infra-repository: pytorch/test-infra
Expand All @@ -155,7 +187,7 @@ jobs:
pre-script: packaging/pre_build_script.sh
uses: pytorch/tensorrt/.github/workflows/linux-test.yml@main
with:
job-name: tests-py-torch-compile-be
job-name: tests-py-torch-compile-be-${{ needs.generate-matrix.outputs.matrix.python_version }}
repository: "pytorch/tensorrt"
ref: ""
test-infra-repository: pytorch/test-infra
Expand Down Expand Up @@ -183,7 +215,7 @@ jobs:
pre-script: packaging/pre_build_script.sh
uses: pytorch/tensorrt/.github/workflows/linux-test.yml@main
with:
job-name: tests-py-dynamo-core
job-name: tests-py-dynamo-core-${{ needs.generate-matrix.outputs.matrix.python_version }}
repository: "pytorch/tensorrt"
ref: ""
test-infra-repository: pytorch/test-infra
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 30e2a8c

Please sign in to comment.