@@ -282,46 +282,54 @@ commands:
282
282
build-py :
283
283
description : " Build the torch-tensorrt python release (pre-cxx11-abi)"
284
284
parameters :
285
+ cuda-version :
286
+ type : string
287
+ torch-build-index :
288
+ type : string
285
289
platform :
286
290
type : string
287
291
default : " x86_64"
288
292
steps :
289
293
- run :
290
294
name : Build torch-tensorrt python release (pre-cxx11-abi)
291
295
command : |
292
- export CUDA_HOME=/usr/local/cuda-11.8 /
296
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
293
297
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
294
- cd py
295
- python3 -m pip install wheel setuptools
296
- python3 -m pip install pybind11==2.6.2
297
- python3 setup.py bdist_wheel
298
- python3 setup.py install
298
+ python3 -m pip install pip==21.3.1
299
+ python3 -m pip wheel --verbose --pre . --extra-index-url << parameters.torch-build-index >> -w dist
300
+ python3 -m pip install dist/torch_tensorrt*
299
301
mkdir -p /tmp/dist/builds
300
- cp dist/* /tmp/dist/builds
302
+ cp dist/torch_tensorrt * /tmp/dist/builds
301
303
302
304
build-py-legacy :
303
305
description : " Build the torch-tensorrt python legacy release (pre-cxx11-abi)"
304
306
parameters :
307
+ cuda-version :
308
+ type : string
309
+ torch-build-index :
310
+ type : string
305
311
platform :
306
312
type : string
307
313
default : " x86_64"
308
314
steps :
309
315
- run :
310
316
name : Build torch-tensorrt python legacy release (pre-cxx11-abi)
311
317
command : |
312
- export CUDA_HOME=/usr/local/cuda-11.8 /
318
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
313
319
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
314
- cd py
315
- python3 -m pip install wheel setuptools
316
- python3 -m pip install pybind11==2.6.2
317
- python3 setup.py bdist_wheel --legacy
318
- python3 setup.py install --legacy
320
+ python3 -m pip install pip==21.3.1
321
+ python3 -m pip wheel --verbose --pre . --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=--legacy" -w dist
322
+ python3 -m pip install dist/torch_tensorrt*
319
323
mkdir -p /tmp/dist/builds
320
- cp dist/* /tmp/dist/builds
324
+ cp dist/torch_tensorrt * /tmp/dist/builds
321
325
322
326
build-py-cxx11-abi :
323
327
description : " Build the torch-tensorrt python release (cxx11-abi)"
324
328
parameters :
329
+ cuda-version :
330
+ type : string
331
+ torch-build-index :
332
+ type : string
325
333
platform :
326
334
type : string
327
335
default : " x86_64"
@@ -333,36 +341,38 @@ commands:
333
341
name : Build setup
334
342
command : |
335
343
mv ~/project/toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> ~/project/WORKSPACE
336
- python3 -m pip install wheel setuptools
337
- python3 -m pip install pybind11==2.6.2
338
344
- when :
339
345
condition : << parameters.release >>
340
346
steps :
341
347
- run :
342
348
name : Build torch-tensorrt python release package
343
349
command : |
344
- export CUDA_HOME=/usr/local/cuda-11.8 /
345
- cd ~/project/py
346
- python3 setup.py bdist_wheel -- use-cxx11-abi --release
347
- python3 setup.py install --use-cxx11-abi --release
350
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
351
+ python3 -m pip install pip==21.3.1
352
+ python3 -m pip wheel --verbose --pre . --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=--release" --config-setting="--build-option=-- use-cxx11-abi" -w dist
353
+ python3 -m pip install dist/torch_tensorrt*
348
354
mkdir -p /tmp/dist/builds
349
- cp dist/* /tmp/dist/builds
355
+ cp dist/torch_tensorrt * /tmp/dist/builds
350
356
- unless :
351
357
condition : << parameters.release >>
352
358
steps :
353
359
- run :
354
360
name : Build torch-tensorrt python package
355
361
command : |
356
- export CUDA_HOME=/usr/local/cuda-11.8 /
357
- cd ~/project/py
358
- python3 setup.py bdist_wheel -- use-cxx11-abi
359
- python3 setup.py install --use-cxx11-abi
362
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
363
+ python3 -m pip install pip==21.3.1
364
+ python3 -m pip wheel --verbose --pre . --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=-- use-cxx11-abi" -w dist
365
+ python3 -m pip install dist/torch_tensorrt*
360
366
mkdir -p /tmp/dist/builds
361
- cp dist/* /tmp/dist/builds
367
+ cp dist/torch_tensorrt * /tmp/dist/builds
362
368
363
369
build-py-fx-only :
364
370
description : " Build the torch-tensorrt python release with only the fx backend"
365
371
parameters :
372
+ cuda-version :
373
+ type : string
374
+ torch-build-index :
375
+ type : string
366
376
platform :
367
377
type : string
368
378
default : " x86_64"
@@ -371,15 +381,13 @@ commands:
371
381
- run :
372
382
name : Build torch-tensorrt python release with only the fx backend
373
383
command : |
374
- export CUDA_HOME=/usr/local/cuda-11.8 /
384
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
375
385
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
376
- cd py
377
- python3 -m pip install wheel setuptools
378
- python3 -m pip install pybind11==2.6.2
379
- python3 setup.py bdist_wheel --fx-only
380
- python3 setup.py install --fx-only
386
+ python3 -m pip install pip==21.3.1
387
+ python3 -m pip wheel --verbose --pre . --extra-index-url << parameters.torch-build-index >> --config-setting="--build-option=--fx-only" -w dist
388
+ python3 -m pip install dist/torch_tensorrt*
381
389
mkdir -p /tmp/dist/builds
382
- cp dist/* /tmp/dist/builds
390
+ cp dist/torch_tensorrt * /tmp/dist/builds
383
391
384
392
build-py-ngc :
385
393
description : " Build the torch-tensorrt python release for NGC PyTorch (cxx11-abi)"
@@ -410,22 +418,21 @@ commands:
410
418
export BAZEL_VERSION="$(cat /home/circleci/project/.bazelversion)"
411
419
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"
412
420
docker exec ngc_build_container bash -c "mv /workspace/docker/WORKSPACE.ngc /workspace/WORKSPACE"
413
- docker exec ngc_build_container bash -c "cd /workspace/py && pip install wheel setuptools pybind11==2.6.2"
414
421
docker exec ngc_build_container bash -c "git config --global --add safe.directory /workspace"
415
422
- when :
416
423
condition : << parameters.release >>
417
424
steps :
418
425
- run :
419
426
name : Build torch-tensorrt release build for NGC
420
427
command : |
421
- docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi --release "
428
+ docker exec ngc_build_container bash -c "cd /workspace/ && python3 -m pip wheel --verbose --pre . --config-setting="--build-option=--release" --config-setting="--build-option=-- use-cxx11-abi" -w dist "
422
429
- unless :
423
430
condition : << parameters.release >>
424
431
steps :
425
432
- run :
426
433
name : Build torch-tensorrt debug build for NGC
427
434
command : |
428
- docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel -- use-cxx11-abi"
435
+ docker exec ngc_build_container bash -c "cd /workspace/py && python3 -m pip wheel --verbose --pre . --config-setting="--build-option=-- use-cxx11-abi" -w dist "
429
436
- run :
430
437
name : Collect builds
431
438
command : |
@@ -808,6 +815,8 @@ jobs:
808
815
type : string
809
816
python-version :
810
817
type : string
818
+ cuda-version :
819
+ type : string
811
820
cxx11-abi :
812
821
type : boolean
813
822
default : false
@@ -834,18 +843,24 @@ jobs:
834
843
- when :
835
844
condition : << parameters.cxx11-abi >>
836
845
steps :
837
- - build-py-cxx11-abi
846
+ - build-py-cxx11-abi :
847
+ cuda-version : << parameters.cuda-version >>
848
+ torch-build-index : << parameters.torch-build-index >>
838
849
- unless :
839
850
condition : << parameters.cxx11-abi >>
840
851
steps :
841
852
- when :
842
853
condition : << parameters.legacy >>
843
854
steps :
844
- - build-py-legacy
855
+ - build-py-legacy :
856
+ cuda-version : << parameters.cuda-version >>
857
+ torch-build-index : << parameters.torch-build-index >>
845
858
- unless :
846
859
condition : << parameters.legacy >>
847
860
steps :
848
- - build-py
861
+ - build-py :
862
+ cuda-version : << parameters.cuda-version >>
863
+ torch-build-index : << parameters.torch-build-index >>
849
864
- run :
850
865
name : Move to build dir
851
866
command : |
@@ -1140,8 +1155,8 @@ jobs:
1140
1155
TRT_VERSION=$(python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)")
1141
1156
CUDNN_VERSION=$(python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)")
1142
1157
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
1143
- pip3 install --upgrade pip
1144
- pip3 install -r ~/project/py/requirements.txt
1158
+ python3 -m pip install pip==21.3.1
1159
+ python3 -m pip install -r ~/project/py/requirements.txt
1145
1160
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
1146
1161
mkdir -p ~/project/py/dist/
1147
1162
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
@@ -1338,6 +1353,10 @@ parameters:
1338
1353
type : string
1339
1354
default : " 3.9.4"
1340
1355
1356
+ cuda-version :
1357
+ type : string
1358
+ default : " 11.8"
1359
+
1341
1360
# Nightly platform config
1342
1361
torch-build :
1343
1362
type : string
@@ -1418,6 +1437,7 @@ workflows:
1418
1437
torchvision-build : << pipeline.parameters.torchvision-build >>
1419
1438
torch-build-index : << pipeline.parameters.torch-build-index >>
1420
1439
python-version : << pipeline.parameters.python-version >>
1440
+ cuda-version : << pipeline.parameters.cuda-version >>
1421
1441
1422
1442
- test-core-cpp-x86_64-linux :
1423
1443
torch-build : << pipeline.parameters.torch-build >>
@@ -1459,6 +1479,7 @@ workflows:
1459
1479
1460
1480
- build-x86_64-linux :
1461
1481
name : build-x86_64-linux-legacy
1482
+ cuda-version : << pipeline.parameters.cuda-version >>
1462
1483
torch-build : << pipeline.parameters.torch-build-legacy >>
1463
1484
torchvision-build : << pipeline.parameters.torchvision-build-legacy >>
1464
1485
torch-build-index : << pipeline.parameters.torch-build-index-legacy >>
@@ -1551,6 +1572,7 @@ workflows:
1551
1572
on-push :
1552
1573
jobs :
1553
1574
- build-x86_64-linux :
1575
+ cuda-version : << pipeline.parameters.cuda-version >>
1554
1576
torch-build : << pipeline.parameters.torch-build >>
1555
1577
torchvision-build : << pipeline.parameters.torchvision-build >>
1556
1578
torch-build-index : << pipeline.parameters.torch-build-index >>
0 commit comments