@@ -282,46 +282,52 @@ 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 wheel --verbose --pre . --index-url << parameters.torch-build-index >> -w dist
299
+ python3 -m pip install dist/*
299
300
mkdir -p /tmp/dist/builds
300
301
cp dist/* /tmp/dist/builds
301
302
302
303
build-py-legacy :
303
304
description : " Build the torch-tensorrt python legacy release (pre-cxx11-abi)"
304
305
parameters :
306
+ cuda-version :
307
+ type : string
308
+ torch-build-index :
309
+ type : string
305
310
platform :
306
311
type : string
307
312
default : " x86_64"
308
313
steps :
309
314
- run :
310
315
name : Build torch-tensorrt python legacy release (pre-cxx11-abi)
311
316
command : |
312
- export CUDA_HOME=/usr/local/cuda-11.8 /
317
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
313
318
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
319
+ python3 -m pip wheel --verbose --pre . --index-url << parameters.torch-build-index >> --config-setting="--build-option=--legacy" -w dist
320
+ python3 -m pip install dist/*
319
321
mkdir -p /tmp/dist/builds
320
322
cp dist/* /tmp/dist/builds
321
323
322
324
build-py-cxx11-abi :
323
325
description : " Build the torch-tensorrt python release (cxx11-abi)"
324
326
parameters :
327
+ cuda-version :
328
+ type : string
329
+ torch-build-index :
330
+ type : string
325
331
platform :
326
332
type : string
327
333
default : " x86_64"
@@ -333,18 +339,15 @@ commands:
333
339
name : Build setup
334
340
command : |
335
341
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
342
- when :
339
343
condition : << parameters.release >>
340
344
steps :
341
345
- run :
342
346
name : Build torch-tensorrt python release package
343
347
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
348
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >>/
349
+ python3 -m pip wheel --verbose --pre . --index-url << parameters.torch-build-index >> --config-setting="--build-option=--release" --config-setting="--build-option=--use-cxx11-abi" -w dist
350
+ python3 -m pip install dist/*
348
351
mkdir -p /tmp/dist/builds
349
352
cp dist/* /tmp/dist/builds
350
353
- unless :
@@ -353,16 +356,19 @@ commands:
353
356
- run :
354
357
name : Build torch-tensorrt python package
355
358
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
359
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >>/
360
+ python3 -m pip wheel --verbose --pre . --index-url << parameters.torch-build-index >> --config-setting="--build-option=--use-cxx11-abi" -w dist
361
+ python3 -m pip install dist/*
360
362
mkdir -p /tmp/dist/builds
361
363
cp dist/* /tmp/dist/builds
362
364
363
365
build-py-fx-only :
364
366
description : " Build the torch-tensorrt python release with only the fx backend"
365
367
parameters :
368
+ cuda-version :
369
+ type : string
370
+ torch-build-index :
371
+ type : string
366
372
platform :
367
373
type : string
368
374
default : " x86_64"
@@ -371,13 +377,10 @@ commands:
371
377
- run :
372
378
name : Build torch-tensorrt python release with only the fx backend
373
379
command : |
374
- export CUDA_HOME=/usr/local/cuda-11.8 /
380
+ export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >> /
375
381
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
382
+ python3 -m pip wheel --verbose --pre . --index-url << parameters.torch-build-index >> --config-setting="--build-option=--fx-only" -w dist
383
+ python3 -m pip install dist/*
381
384
mkdir -p /tmp/dist/builds
382
385
cp dist/* /tmp/dist/builds
383
386
@@ -410,22 +413,21 @@ commands:
410
413
export BAZEL_VERSION="$(cat /home/circleci/project/.bazelversion)"
411
414
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
415
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
416
docker exec ngc_build_container bash -c "git config --global --add safe.directory /workspace"
415
417
- when :
416
418
condition : << parameters.release >>
417
419
steps :
418
420
- run :
419
421
name : Build torch-tensorrt release build for NGC
420
422
command : |
421
- docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi --release "
423
+ 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
424
- unless :
423
425
condition : << parameters.release >>
424
426
steps :
425
427
- run :
426
428
name : Build torch-tensorrt debug build for NGC
427
429
command : |
428
- docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel -- use-cxx11-abi"
430
+ 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
431
- run :
430
432
name : Collect builds
431
433
command : |
@@ -808,6 +810,8 @@ jobs:
808
810
type : string
809
811
python-version :
810
812
type : string
813
+ cuda-version :
814
+ type : string
811
815
cxx11-abi :
812
816
type : boolean
813
817
default : false
@@ -834,18 +838,24 @@ jobs:
834
838
- when :
835
839
condition : << parameters.cxx11-abi >>
836
840
steps :
837
- - build-py-cxx11-abi
841
+ - build-py-cxx11-abi :
842
+ cuda-version : << parameters.cuda-version >>
843
+ torch-build-index : << parameters.torch-build-index >>
838
844
- unless :
839
845
condition : << parameters.cxx11-abi >>
840
846
steps :
841
847
- when :
842
848
condition : << parameters.legacy >>
843
849
steps :
844
- - build-py-legacy
850
+ - build-py-legacy :
851
+ cuda-version : << parameters.cuda-version >>
852
+ torch-build-index : << parameters.torch-build-index >>
845
853
- unless :
846
854
condition : << parameters.legacy >>
847
855
steps :
848
- - build-py
856
+ - build-py :
857
+ cuda-version : << parameters.cuda-version >>
858
+ torch-build-index : << parameters.torch-build-index >>
849
859
- run :
850
860
name : Move to build dir
851
861
command : |
@@ -1338,6 +1348,10 @@ parameters:
1338
1348
type : string
1339
1349
default : " 3.9.4"
1340
1350
1351
+ cuda-version :
1352
+ type : string
1353
+ default : " 11.8"
1354
+
1341
1355
# Nightly platform config
1342
1356
torch-build :
1343
1357
type : string
@@ -1418,6 +1432,7 @@ workflows:
1418
1432
torchvision-build : << pipeline.parameters.torchvision-build >>
1419
1433
torch-build-index : << pipeline.parameters.torch-build-index >>
1420
1434
python-version : << pipeline.parameters.python-version >>
1435
+ cuda-version : << pipeline.parameters.cuda-version >>
1421
1436
1422
1437
- test-core-cpp-x86_64-linux :
1423
1438
torch-build : << pipeline.parameters.torch-build >>
@@ -1459,6 +1474,7 @@ workflows:
1459
1474
1460
1475
- build-x86_64-linux :
1461
1476
name : build-x86_64-linux-legacy
1477
+ cuda-version : << pipeline.parameters.cuda-version >>
1462
1478
torch-build : << pipeline.parameters.torch-build-legacy >>
1463
1479
torchvision-build : << pipeline.parameters.torchvision-build-legacy >>
1464
1480
torch-build-index : << pipeline.parameters.torch-build-index-legacy >>
@@ -1551,6 +1567,7 @@ workflows:
1551
1567
on-push :
1552
1568
jobs :
1553
1569
- build-x86_64-linux :
1570
+ cuda-version : << pipeline.parameters.cuda-version >>
1554
1571
torch-build : << pipeline.parameters.torch-build >>
1555
1572
torchvision-build : << pipeline.parameters.torchvision-build >>
1556
1573
torch-build-index : << pipeline.parameters.torch-build-index >>
0 commit comments