Skip to content

Commit e926724

Browse files
committed
chore: rebase
Signed-off-by: Dheeraj Peri <[email protected]>
2 parents 2860be6 + 692921e commit e926724

File tree

291 files changed

+32003
-9357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+32003
-9357
lines changed

.circleci/config.yml

Lines changed: 90 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,11 @@ commands:
317317
name: Build torch-tensorrt python legacy release (pre-cxx11-abi)
318318
command: |
319319
export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >>/
320-
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
321-
python3 -m pip install pip==22.0.2
322-
python3 -m pip wheel --no-deps --verbose --pre . --extra-index-url https://pypi.nvidia.com --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=--legacy" -w dist
320+
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >>.legacy WORKSPACE
321+
mv toolchains/legacy/pyproject.toml pyproject.toml
322+
python3 -m pip install wheel setuptools pyyaml
323+
python3 -m pip install pybind11==2.6.2
324+
python3 setup.py bdist_wheel --legacy
323325
python3 -m pip install dist/torch_tensorrt*
324326
mkdir -p /tmp/dist/builds
325327
cp dist/torch_tensorrt* /tmp/dist/builds
@@ -754,14 +756,30 @@ commands:
754756

755757
# =================== Dynamo tests start ======================== #
756758

757-
test-dynamo-torch_compile:
758-
description: "Test Dynamo torch_compile tests"
759+
test-dynamo-backend:
760+
description: "Test Dynamo backend tests"
759761
steps:
760762
- run:
761-
name: Run Dynamo torch_compile tests
763+
name: Run Dynamo backend tests
762764
command: |
763765
cd tests/py/dynamo/backend/
764-
pytest --junitxml=/tmp/artifacts/test_results/dynamo/torch_compile/test_results.xml
766+
TESTS_TO_RUN=$(circleci tests glob "test_*.py" | circleci tests split --split-by=timings)
767+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/backend/test_results.xml $TESTS_TO_RUN
768+
769+
- store_test_results:
770+
path: /tmp/artifacts
771+
- store_artifacts:
772+
path: /tmp/testlogs
773+
774+
test-dynamo-shared_utilities:
775+
description: "Test Dynamo shared utilities tests"
776+
steps:
777+
- run:
778+
name: Run Dynamo lowering, partitioning, runtime tests
779+
command: |
780+
cd tests/py/dynamo/
781+
TESTS_TO_RUN=$(circleci tests glob "runtime/test_*.py" "partitioning/test_*.py" "lowering/test_*.py" | circleci tests split --split-by=timings)
782+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/shared_utilities/test_results.xml $TESTS_TO_RUN
765783
766784
- store_test_results:
767785
path: /tmp/artifacts
@@ -806,9 +824,9 @@ commands:
806824
- run:
807825
name: Run Dynamo converter tests
808826
command: |
809-
cd tests/py/dynamo/converters
827+
cd tests/py/dynamo/conversion
810828
TESTS_TO_RUN=$(circleci tests glob "test_*.py" | circleci tests split --split-by=timings)
811-
pytest --junitxml=/tmp/artifacts/test_results/dynamo/converters/test_results.xml $TESTS_TO_RUN
829+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/conversion/test_results.xml $TESTS_TO_RUN
812830
813831
- store_test_results:
814832
path: /tmp/artifacts
@@ -838,8 +856,11 @@ jobs:
838856
legacy:
839857
type: boolean
840858
default: false
859+
ci-image:
860+
type: string
861+
default: "linux-cuda-12:2023.05.1"
841862
machine:
842-
image: linux-cuda-12:2023.05.1
863+
image: << parameters.ci-image >>
843864
resource_class: gpu.nvidia.small
844865
steps:
845866
- checkout
@@ -905,8 +926,14 @@ jobs:
905926
type: string
906927
cudnn-version:
907928
type: string
929+
ci-image:
930+
type: string
931+
default: "linux-cuda-12:2023.05.1"
932+
platform:
933+
type: string
934+
default: "x86_64"
908935
machine:
909-
image: linux-cuda-12:2023.05.1
936+
image: << parameters.ci-image >>
910937
resource_class: gpu.nvidia.medium
911938
parallelism: 4
912939
steps:
@@ -931,7 +958,8 @@ jobs:
931958
name: "Install torch-tensorrt"
932959
command: pip3 install /tmp/dist/x86_64-linux/*cp310-cp310*.whl
933960
- dump-test-env
934-
- test-ts-core
961+
- test-ts-core:
962+
platform: << parameters.platform >>
935963

936964
test-py-ts-x86_64-linux:
937965
parameters:
@@ -945,8 +973,11 @@ jobs:
945973
type: string
946974
python-version:
947975
type: string
976+
ci-image:
977+
type: string
978+
default: "linux-cuda-12:2023.05.1"
948979
machine:
949-
image: linux-cuda-12:2023.05.1
980+
image: << parameters.ci-image >>
950981
resource_class: gpu.nvidia.medium
951982
steps:
952983
- checkout
@@ -978,9 +1009,12 @@ jobs:
9781009
type: string
9791010
python-version:
9801011
type: string
1012+
ci-image:
1013+
type: string
1014+
default: "linux-cuda-12:2023.05.1"
9811015
parallelism: 8
9821016
machine:
983-
image: linux-cuda-12:2023.05.1
1017+
image: << parameters.ci-image >>
9841018
resource_class: gpu.nvidia.medium
9851019
steps:
9861020
- checkout
@@ -1014,9 +1048,12 @@ jobs:
10141048
type: string
10151049
python-version:
10161050
type: string
1051+
ci-image:
1052+
type: string
1053+
default: "linux-cuda-12:2023.05.1"
10171054
parallelism: 8
10181055
machine:
1019-
image: linux-cuda-12:2023.05.1
1056+
image: << parameters.ci-image >>
10201057
resource_class: gpu.nvidia.medium
10211058
steps:
10221059
- checkout
@@ -1053,9 +1090,12 @@ jobs:
10531090
type: string
10541091
python-version:
10551092
type: string
1093+
ci-image:
1094+
type: string
1095+
default: "linux-cuda-12:2023.05.1"
10561096
parallelism: 4
10571097
machine:
1058-
image: linux-cuda-12:2023.05.1
1098+
image: << parameters.ci-image >>
10591099
resource_class: gpu.nvidia.medium
10601100
steps:
10611101
- checkout
@@ -1079,7 +1119,8 @@ jobs:
10791119
# We install torch after torch-trt because pip automatically enforces the version constraint otherwise
10801120
- dump-test-env
10811121
- test-dynamo-converters
1082-
- test-dynamo-torch_compile
1122+
- test-dynamo-backend
1123+
- test-dynamo-shared_utilities
10831124
- test-dynamo-models_torch_compile
10841125
- test-dynamo-models_torch_export
10851126

@@ -1092,9 +1133,12 @@ jobs:
10921133
type: string
10931134
torch-build-index:
10941135
type: string
1136+
ci-image:
1137+
type: string
1138+
default: "linux-cuda-12:2023.05.1"
10951139
parallelism: 4
10961140
machine:
1097-
image: linux-cuda-12:2023.05.1
1141+
image: << parameters.ci-image >>
10981142
resource_class: gpu.nvidia.small
10991143
steps:
11001144
- when:
@@ -1142,8 +1186,11 @@ jobs:
11421186
type: string
11431187
torch-build-index:
11441188
type: string
1189+
ci-image:
1190+
type: string
1191+
default: "linux-cuda-12:2023.05.1"
11451192
machine:
1146-
image: linux-cuda-12:2023.05.1
1193+
image: << parameters.ci-image >>
11471194
resource_class: gpu.nvidia.small
11481195
steps:
11491196
- when:
@@ -1278,8 +1325,11 @@ jobs:
12781325
type: string
12791326
python-version:
12801327
type: string
1328+
ci-image:
1329+
type: string
1330+
default: "linux-cuda-12:2023.05.1"
12811331
machine:
1282-
image: linux-cuda-12:2023.05.1
1332+
image: << parameters.ci-image >>
12831333
resource_class: gpu.nvidia.small
12841334
steps:
12851335
- checkout
@@ -1315,8 +1365,11 @@ jobs:
13151365
parameters:
13161366
torch-base-image:
13171367
type: string
1368+
ci-image:
1369+
type: string
1370+
default: "linux-cuda-12:2023.05.1"
13181371
machine:
1319-
image: linux-cuda-12:2023.05.1
1372+
image: << parameters.ci-image >>
13201373
resource_class: gpu.nvidia.small
13211374
steps:
13221375
- checkout
@@ -1343,8 +1396,11 @@ jobs:
13431396
default: false
13441397
torch-base-image:
13451398
type: string
1399+
ci-image:
1400+
type: string
1401+
default: "linux-cuda-12:2023.05.1"
13461402
machine:
1347-
image: linux-cuda-12:2023.05.1
1403+
image: << parameters.ci-image >>
13481404
resource_class: gpu.nvidia.small
13491405
steps:
13501406
- when:
@@ -1400,7 +1456,7 @@ parameters:
14001456
# Legacy platform config
14011457
cuda-version-legacy:
14021458
type: string
1403-
default: "11.7"
1459+
default: "11.8"
14041460
torch-build-legacy:
14051461
type: string
14061462
default: "1.13.1+cu117"
@@ -1419,6 +1475,12 @@ parameters:
14191475
trt-version-long-legacy:
14201476
type: string
14211477
default: "8.6.1"
1478+
ci-image-legacy:
1479+
type: string
1480+
default: "linux-cuda-11:2023.02.1"
1481+
platform-legacy:
1482+
type: string
1483+
default: "x86_64.legacy"
14221484

14231485
# Jetson platform config
14241486
cuda-jetson-version:
@@ -1523,6 +1585,7 @@ workflows:
15231585
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
15241586
python-version: << pipeline.parameters.python-version >>
15251587
legacy: << pipeline.parameters.enable-legacy >>
1588+
ci-image: << pipeline.parameters.ci-image-legacy >>
15261589

15271590
- test-core-cpp-x86_64-linux:
15281591
name: test-core-cpp-x86_64-linux-legacy
@@ -1533,6 +1596,8 @@ workflows:
15331596
trt-version-long: << pipeline.parameters.trt-version-long-legacy >>
15341597
cudnn-version: << pipeline.parameters.cudnn-version-legacy >>
15351598
python-version: << pipeline.parameters.python-version >>
1599+
ci-image: << pipeline.parameters.ci-image-legacy >>
1600+
platform: << pipeline.parameters.platform-legacy >>
15361601
requires:
15371602
- build-x86_64-linux-legacy
15381603

@@ -1543,6 +1608,7 @@ workflows:
15431608
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
15441609
trt-version-long: << pipeline.parameters.trt-version-long-legacy >>
15451610
python-version: << pipeline.parameters.python-version >>
1611+
ci-image: << pipeline.parameters.ci-image-legacy >>
15461612
requires:
15471613
- build-x86_64-linux-legacy
15481614

@@ -1552,6 +1618,7 @@ workflows:
15521618
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
15531619
trt-version-long: << pipeline.parameters.trt-version-long-legacy >>
15541620
python-version: << pipeline.parameters.python-version >>
1621+
ci-image: << pipeline.parameters.ci-image-legacy >>
15551622
requires:
15561623
- build-x86_64-linux-legacy
15571624

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
set -eou pipefail
3+
# Source conda so it's available to the script environment
4+
source ${BUILD_ENV_FILE}
5+
${CONDA_RUN} ${PIP_INSTALL_TORCH} torchvision pyyaml
6+
export TRT_VERSION=$(${CONDA_RUN} python -c "import versions; versions.tensorrt_version()")
7+
${CONDA_RUN} python -m pip install /opt/torch-tensorrt-builds/torch_tensorrt*+${CU_VERSION}*.whl tensorrt~=${TRT_VERSION} tensorrt-bindings~=${TRT_VERSION} --extra-index-url=https://pypi.ngc.nvidia.com
8+
9+
echo -e "Running test script";

0 commit comments

Comments
 (0)