@@ -215,7 +215,7 @@ commands:
215
215
parameters :
216
216
python-version :
217
217
type : string
218
- default : " 3.9.4 "
218
+ default : " 3.10.9 "
219
219
steps :
220
220
- run :
221
221
name : Set python version
@@ -268,46 +268,54 @@ commands:
268
268
build-py :
269
269
description : " Build the torch-tensorrt python release (pre-cxx11-abi)"
270
270
parameters :
271
+ cuda-version :
272
+ type : string
273
+ torch-build-index :
274
+ type : string
271
275
platform :
272
276
type : string
273
277
default : " x86_64"
274
278
steps :
275
279
- run :
276
280
name : Build torch-tensorrt python release (pre-cxx11-abi)
277
281
command : |
278
- export CUDA_HOME=/usr/local/cuda-12.1 /
282
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
279
283
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
280
- cd py
281
- python3 -m pip install wheel setuptools
282
- python3 -m pip install pybind11==2.6.2
283
- python3 setup.py bdist_wheel
284
- python3 setup.py install
284
+ python3 -m pip install pip==22.0.2
285
+ python3 -m pip wheel --no-deps --verbose --pre . --extra-index-url << parameters.torch-build-index >> -w dist
286
+ python3 -m pip install dist/torch_tensorrt*
285
287
mkdir -p /tmp/dist/builds
286
- cp dist/* /tmp/dist/builds
288
+ cp dist/torch_tensorrt * /tmp/dist/builds
287
289
288
290
build-py-legacy :
289
291
description : " Build the torch-tensorrt python legacy release (pre-cxx11-abi)"
290
292
parameters :
293
+ cuda-version :
294
+ type : string
295
+ torch-build-index :
296
+ type : string
291
297
platform :
292
298
type : string
293
299
default : " x86_64"
294
300
steps :
295
301
- run :
296
302
name : Build torch-tensorrt python legacy release (pre-cxx11-abi)
297
303
command : |
298
- export CUDA_HOME=/usr/local/cuda-12.1 /
304
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
299
305
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
300
- cd py
301
- python3 -m pip install wheel setuptools
302
- python3 -m pip install pybind11==2.6.2
303
- python3 setup.py bdist_wheel --legacy
304
- python3 setup.py install --legacy
306
+ python3 -m pip install pip==22.0.2
307
+ python3 -m pip wheel --no-deps --verbose --pre . --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=--legacy" -w dist
308
+ python3 -m pip install dist/torch_tensorrt*
305
309
mkdir -p /tmp/dist/builds
306
- cp dist/* /tmp/dist/builds
310
+ cp dist/torch_tensorrt * /tmp/dist/builds
307
311
308
312
build-py-cxx11-abi :
309
313
description : " Build the torch-tensorrt python release (cxx11-abi)"
310
314
parameters :
315
+ cuda-version :
316
+ type : string
317
+ torch-build-index :
318
+ type : string
311
319
platform :
312
320
type : string
313
321
default : " x86_64"
@@ -319,36 +327,38 @@ commands:
319
327
name : Build setup
320
328
command : |
321
329
mv ~/project/toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> ~/project/WORKSPACE
322
- python3 -m pip install wheel setuptools
323
- python3 -m pip install pybind11==2.6.2
324
330
- when :
325
331
condition : << parameters.release >>
326
332
steps :
327
333
- run :
328
334
name : Build torch-tensorrt python release package
329
335
command : |
330
- export CUDA_HOME=/usr/local/cuda-12.1 /
331
- cd ~/project/py
332
- python3 setup.py bdist_wheel -- use-cxx11-abi --release
333
- python3 setup.py install --use-cxx11-abi --release
336
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
337
+ python3 -m pip install pip==22.0.2
338
+ python3 -m pip wheel --no-deps --verbose --pre . --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=--release" --config-setting="--build-option=-- use-cxx11-abi" -w dist
339
+ python3 -m pip install dist/torch_tensorrt*
334
340
mkdir -p /tmp/dist/builds
335
- cp dist/* /tmp/dist/builds
341
+ cp dist/torch_tensorrt * /tmp/dist/builds
336
342
- unless :
337
343
condition : << parameters.release >>
338
344
steps :
339
345
- run :
340
346
name : Build torch-tensorrt python package
341
347
command : |
342
- export CUDA_HOME=/usr/local/cuda-12.1 /
343
- cd ~/project/py
344
- python3 setup.py bdist_wheel -- use-cxx11-abi
345
- python3 setup.py install --use-cxx11-abi
348
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
349
+ python3 -m pip install pip==22.0.2
350
+ python3 -m pip wheel --no-deps --verbose --pre . --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=-- use-cxx11-abi" -w dist
351
+ python3 -m pip install dist/torch_tensorrt*
346
352
mkdir -p /tmp/dist/builds
347
- cp dist/* /tmp/dist/builds
353
+ cp dist/torch_tensorrt * /tmp/dist/builds
348
354
349
355
build-py-fx-only :
350
356
description : " Build the torch-tensorrt python release with only the fx backend"
351
357
parameters :
358
+ cuda-version :
359
+ type : string
360
+ torch-build-index :
361
+ type : string
352
362
platform :
353
363
type : string
354
364
default : " x86_64"
@@ -357,15 +367,13 @@ commands:
357
367
- run :
358
368
name : Build torch-tensorrt python release with only the fx backend
359
369
command : |
360
- export CUDA_HOME=/usr/local/cuda-12.1 /
370
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
361
371
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
362
- cd py
363
- python3 -m pip install wheel setuptools
364
- python3 -m pip install pybind11==2.6.2
365
- python3 setup.py bdist_wheel --fx-only
366
- python3 setup.py install --fx-only
372
+ python3 -m pip install pip==22.0.2
373
+ python3 -m pip wheel --no-deps --verbose --pre . --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=--fx-only" -w dist
374
+ python3 -m pip install dist/torch_tensorrt*
367
375
mkdir -p /tmp/dist/builds
368
- cp dist/* /tmp/dist/builds
376
+ cp dist/torch_tensorrt * /tmp/dist/builds
369
377
370
378
build-py-ngc :
371
379
description : " Build the torch-tensorrt python release for NGC PyTorch (cxx11-abi)"
@@ -396,22 +404,21 @@ commands:
396
404
export BAZEL_VERSION="$(cat /home/circleci/project/.bazelversion)"
397
405
docker exec ngc_build_container bash -c "wget https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-linux-x86_64 -O /usr/bin/bazel && chmod a+x /usr/bin/bazel"
398
406
docker exec ngc_build_container bash -c "mv /workspace/docker/WORKSPACE.ngc /workspace/WORKSPACE"
399
- docker exec ngc_build_container bash -c "cd /workspace/py && pip install wheel setuptools pybind11==2.6.2"
400
407
docker exec ngc_build_container bash -c "git config --global --add safe.directory /workspace"
401
408
- when :
402
409
condition : << parameters.release >>
403
410
steps :
404
411
- run :
405
412
name : Build torch-tensorrt release build for NGC
406
413
command : |
407
- docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi --release "
414
+ docker exec ngc_build_container bash -c "cd /workspace/ && python3 -m pip wheel --no-deps --verbose --pre . --config-setting="--build-option=--release" --config-setting="--build-option=-- use-cxx11-abi" -w dist "
408
415
- unless :
409
416
condition : << parameters.release >>
410
417
steps :
411
418
- run :
412
419
name : Build torch-tensorrt debug build for NGC
413
420
command : |
414
- docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel -- use-cxx11-abi"
421
+ docker exec ngc_build_container bash -c "cd /workspace/py && python3 -m pip wheel --no-deps --verbose --pre . --config-setting="--build-option=-- use-cxx11-abi" -w dist "
415
422
- run :
416
423
name : Collect builds
417
424
command : |
@@ -432,7 +439,7 @@ commands:
432
439
export PATH=$PATH:/usr/local/cuda-12.1/bin
433
440
~/cmake/bin/cmake -S. -Bbuild \
434
441
-DCMAKE_MODULE_PATH=cmake/Module \
435
- -DTorch_DIR=/opt/circleci/.pyenv/versions/3.9.4 /lib/python3.9 /site-packages/torch/share/cmake/Torch \
442
+ -DTorch_DIR=/opt/circleci/.pyenv/versions/3.10.9 /lib/python3.10 /site-packages/torch/share/cmake/Torch \
436
443
-DTensorRT_ROOT=/usr \
437
444
-DCMAKE_BUILD_TYPE=Debug
438
445
cmake --build build -- -j12
@@ -481,7 +488,7 @@ commands:
481
488
name : Run core / C++ tests
482
489
no_output_timeout : 15m
483
490
environment :
484
- LD_LIBRARY_PATH : " /opt/circleci/.pyenv/versions/3.9.4 /lib/python3.9 /site-packages/torch_tensorrt.libs:/home/circleci/project/bazel-project/external/libtorch_pre_cxx11_abi/lib/:/home/circleci/project/bazel-project/external/tensorrt/lib/:/usr/local/cuda-12.1/lib64/:$LD_LIBRARY_PATH"
491
+ LD_LIBRARY_PATH : " /opt/circleci/.pyenv/versions/3.10.9 /lib/python3.10 /site-packages/torch_tensorrt.libs:/home/circleci/project/bazel-project/external/libtorch_pre_cxx11_abi/lib/:/home/circleci/project/bazel-project/external/tensorrt/lib/:/usr/local/cuda-12.1/lib64/:$LD_LIBRARY_PATH"
485
492
command : |
486
493
set -e
487
494
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
@@ -794,6 +801,8 @@ jobs:
794
801
type : string
795
802
python-version :
796
803
type : string
804
+ cuda-version :
805
+ type : string
797
806
cxx11-abi :
798
807
type : boolean
799
808
default : false
@@ -820,18 +829,24 @@ jobs:
820
829
- when :
821
830
condition : << parameters.cxx11-abi >>
822
831
steps :
823
- - build-py-cxx11-abi
832
+ - build-py-cxx11-abi :
833
+ cuda-version : << parameters.cuda-version >>
834
+ torch-build-index : << parameters.torch-build-index >>
824
835
- unless :
825
836
condition : << parameters.cxx11-abi >>
826
837
steps :
827
838
- when :
828
839
condition : << parameters.legacy >>
829
840
steps :
830
- - build-py-legacy
841
+ - build-py-legacy :
842
+ cuda-version : << parameters.cuda-version >>
843
+ torch-build-index : << parameters.torch-build-index >>
831
844
- unless :
832
845
condition : << parameters.legacy >>
833
846
steps :
834
- - build-py
847
+ - build-py :
848
+ cuda-version : << parameters.cuda-version >>
849
+ torch-build-index : << parameters.torch-build-index >>
835
850
- run :
836
851
name : Move to build dir
837
852
command : |
@@ -885,7 +900,7 @@ jobs:
885
900
at : /tmp/dist
886
901
- run :
887
902
name : " Install torch-tensorrt"
888
- command : pip3 install /tmp/dist/x86_64-linux/*cp39-cp39 *.whl
903
+ command : python3 -m pip install --pre /tmp/dist/x86_64-linux/*cp310-cp310 *.whl --extra-index-url << parameters.torch-build-index >>
889
904
- dump-test-env
890
905
- test-ts-core
891
906
@@ -918,7 +933,7 @@ jobs:
918
933
torch-build-index : << parameters.torch-build-index >>
919
934
- run :
920
935
name : " Install torch-tensorrt"
921
- command : pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39 *.whl
936
+ command : python3 -m pip install --pre /tmp/dist/x86_64-linux/*cp310-cp310 *.whl --extra-index-url << parameters.torch-build-index >>
922
937
- dump-test-env
923
938
- test-ts-py-api
924
939
@@ -953,7 +968,7 @@ jobs:
953
968
- install-cudnn
954
969
- run :
955
970
name : " Install torch-tensorrt"
956
- command : pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39 *.whl
971
+ command : python3 -m pip install --pre /tmp/dist/x86_64-linux/*cp310-cp310 *.whl --extra-index-url << parameters.torch-build-index >>
957
972
# We install torch after torch-trt because pip automatically enforces the version constraint otherwise
958
973
- dump-test-env
959
974
- test-fx
@@ -992,7 +1007,7 @@ jobs:
992
1007
# command: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
993
1008
- run :
994
1009
name : " Install torch-tensorrt"
995
- command : pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39 *.whl
1010
+ command : python3 -m pip install --pre /tmp/dist/x86_64-linux/*cp310-cp310 *.whl --extra-index-url << parameters.torch-build-index >>
996
1011
# We install torch after torch-trt because pip automatically enforces the version constraint otherwise
997
1012
- dump-test-env
998
1013
- test-fx-no-aten
@@ -1030,7 +1045,7 @@ jobs:
1030
1045
# command: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
1031
1046
- run :
1032
1047
name : " Install torch-tensorrt"
1033
- command : pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39 *.whl
1048
+ command : python3 -m pip install --pre /tmp/dist/x86_64-linux/*cp310-cp310 *.whl --extra-index-url << parameters.torch-build-index >>
1034
1049
# We install torch after torch-trt because pip automatically enforces the version constraint otherwise
1035
1050
- dump-test-env
1036
1051
- test-dynamo-compile
@@ -1126,8 +1141,8 @@ jobs:
1126
1141
TRT_VERSION=$(python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)")
1127
1142
CUDNN_VERSION=$(python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)")
1128
1143
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
1129
- pip3 install --upgrade pip
1130
- pip3 install -r ~/project/py/requirements.txt
1144
+ python3 -m pip install pip==22.0.2
1145
+ python3 -m pip install -r ~/project/py/requirements.txt
1131
1146
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
1132
1147
mkdir -p ~/project/py/dist/
1133
1148
cp ~/project/bazel-bin/libtorchtrt.tar.gz ~/project/py/dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
@@ -1322,7 +1337,11 @@ jobs:
1322
1337
parameters :
1323
1338
python-version :
1324
1339
type : string
1325
- default : " 3.9.4"
1340
+ default : " 3.10.9"
1341
+
1342
+ cuda-version :
1343
+ type : string
1344
+ default : " 12.1"
1326
1345
1327
1346
# Nightly platform config
1328
1347
torch-build :
@@ -1404,6 +1423,7 @@ workflows:
1404
1423
torchvision-build : << pipeline.parameters.torchvision-build >>
1405
1424
torch-build-index : << pipeline.parameters.torch-build-index >>
1406
1425
python-version : << pipeline.parameters.python-version >>
1426
+ cuda-version : << pipeline.parameters.cuda-version >>
1407
1427
1408
1428
- test-core-cpp-x86_64-linux :
1409
1429
torch-build : << pipeline.parameters.torch-build >>
@@ -1445,6 +1465,7 @@ workflows:
1445
1465
1446
1466
- build-x86_64-linux :
1447
1467
name : build-x86_64-linux-legacy
1468
+ cuda-version : << pipeline.parameters.cuda-version >>
1448
1469
torch-build : << pipeline.parameters.torch-build-legacy >>
1449
1470
torchvision-build : << pipeline.parameters.torchvision-build-legacy >>
1450
1471
torch-build-index : << pipeline.parameters.torch-build-index-legacy >>
@@ -1537,6 +1558,7 @@ workflows:
1537
1558
on-push :
1538
1559
jobs :
1539
1560
- build-x86_64-linux :
1561
+ cuda-version : << pipeline.parameters.cuda-version >>
1540
1562
torch-build : << pipeline.parameters.torch-build >>
1541
1563
torchvision-build : << pipeline.parameters.torchvision-build >>
1542
1564
torch-build-index : << pipeline.parameters.torch-build-index >>
0 commit comments