diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 80a9f15c94..bf5229640a 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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] @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel.tmpl b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel.tmpl index 00b85034fe..1c50651cea 100644 --- a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel.tmpl +++ b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel.tmpl @@ -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