Skip to content

Commit a080d76

Browse files
committed
chore: update CI for new build path
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 0db3615 commit a080d76

File tree

1 file changed

+51
-34
lines changed

1 file changed

+51
-34
lines changed

.circleci/config.yml

+51-34
Original file line numberDiff line numberDiff line change
@@ -282,46 +282,52 @@ commands:
282282
build-py:
283283
description: "Build the torch-tensorrt python release (pre-cxx11-abi)"
284284
parameters:
285+
cuda-version:
286+
type: string
287+
torch-build-index:
288+
type: string
285289
platform:
286290
type: string
287291
default: "x86_64"
288292
steps:
289293
- run:
290294
name: Build torch-tensorrt python release (pre-cxx11-abi)
291295
command: |
292-
export CUDA_HOME=/usr/local/cuda-11.8/
296+
export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >>/
293297
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/*
299300
mkdir -p /tmp/dist/builds
300301
cp dist/* /tmp/dist/builds
301302
302303
build-py-legacy:
303304
description: "Build the torch-tensorrt python legacy release (pre-cxx11-abi)"
304305
parameters:
306+
cuda-version:
307+
type: string
308+
torch-build-index:
309+
type: string
305310
platform:
306311
type: string
307312
default: "x86_64"
308313
steps:
309314
- run:
310315
name: Build torch-tensorrt python legacy release (pre-cxx11-abi)
311316
command: |
312-
export CUDA_HOME=/usr/local/cuda-11.8/
317+
export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >>/
313318
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/*
319321
mkdir -p /tmp/dist/builds
320322
cp dist/* /tmp/dist/builds
321323
322324
build-py-cxx11-abi:
323325
description: "Build the torch-tensorrt python release (cxx11-abi)"
324326
parameters:
327+
cuda-version:
328+
type: string
329+
torch-build-index:
330+
type: string
325331
platform:
326332
type: string
327333
default: "x86_64"
@@ -333,18 +339,15 @@ commands:
333339
name: Build setup
334340
command: |
335341
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
338342
- when:
339343
condition: << parameters.release >>
340344
steps:
341345
- run:
342346
name: Build torch-tensorrt python release package
343347
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/*
348351
mkdir -p /tmp/dist/builds
349352
cp dist/* /tmp/dist/builds
350353
- unless:
@@ -353,16 +356,19 @@ commands:
353356
- run:
354357
name: Build torch-tensorrt python package
355358
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/*
360362
mkdir -p /tmp/dist/builds
361363
cp dist/* /tmp/dist/builds
362364
363365
build-py-fx-only:
364366
description: "Build the torch-tensorrt python release with only the fx backend"
365367
parameters:
368+
cuda-version:
369+
type: string
370+
torch-build-index:
371+
type: string
366372
platform:
367373
type: string
368374
default: "x86_64"
@@ -371,13 +377,10 @@ commands:
371377
- run:
372378
name: Build torch-tensorrt python release with only the fx backend
373379
command: |
374-
export CUDA_HOME=/usr/local/cuda-11.8/
380+
export CUDA_HOME=/usr/local/cuda-<< parameters.cuda-version >>/
375381
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/*
381384
mkdir -p /tmp/dist/builds
382385
cp dist/* /tmp/dist/builds
383386
@@ -410,22 +413,21 @@ commands:
410413
export BAZEL_VERSION="$(cat /home/circleci/project/.bazelversion)"
411414
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"
412415
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"
414416
docker exec ngc_build_container bash -c "git config --global --add safe.directory /workspace"
415417
- when:
416418
condition: << parameters.release >>
417419
steps:
418420
- run:
419421
name: Build torch-tensorrt release build for NGC
420422
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"
422424
- unless:
423425
condition: << parameters.release >>
424426
steps:
425427
- run:
426428
name: Build torch-tensorrt debug build for NGC
427429
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"
429431
- run:
430432
name: Collect builds
431433
command: |
@@ -808,6 +810,8 @@ jobs:
808810
type: string
809811
python-version:
810812
type: string
813+
cuda-version:
814+
type: string
811815
cxx11-abi:
812816
type: boolean
813817
default: false
@@ -834,18 +838,24 @@ jobs:
834838
- when:
835839
condition: << parameters.cxx11-abi >>
836840
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 >>
838844
- unless:
839845
condition: << parameters.cxx11-abi >>
840846
steps:
841847
- when:
842848
condition: << parameters.legacy >>
843849
steps:
844-
- build-py-legacy
850+
- build-py-legacy:
851+
cuda-version: << parameters.cuda-version >>
852+
torch-build-index: << parameters.torch-build-index >>
845853
- unless:
846854
condition: << parameters.legacy >>
847855
steps:
848-
- build-py
856+
- build-py:
857+
cuda-version: << parameters.cuda-version >>
858+
torch-build-index: << parameters.torch-build-index >>
849859
- run:
850860
name: Move to build dir
851861
command: |
@@ -1338,6 +1348,10 @@ parameters:
13381348
type: string
13391349
default: "3.9.4"
13401350

1351+
cuda-version:
1352+
type: string
1353+
default: "11.8"
1354+
13411355
# Nightly platform config
13421356
torch-build:
13431357
type: string
@@ -1418,6 +1432,7 @@ workflows:
14181432
torchvision-build: << pipeline.parameters.torchvision-build >>
14191433
torch-build-index: << pipeline.parameters.torch-build-index >>
14201434
python-version: << pipeline.parameters.python-version >>
1435+
cuda-version: << pipeline.parameters.cuda-version >>
14211436

14221437
- test-core-cpp-x86_64-linux:
14231438
torch-build: << pipeline.parameters.torch-build >>
@@ -1459,6 +1474,7 @@ workflows:
14591474

14601475
- build-x86_64-linux:
14611476
name: build-x86_64-linux-legacy
1477+
cuda-version: << pipeline.parameters.cuda-version >>
14621478
torch-build: << pipeline.parameters.torch-build-legacy >>
14631479
torchvision-build: << pipeline.parameters.torchvision-build-legacy >>
14641480
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
@@ -1551,6 +1567,7 @@ workflows:
15511567
on-push:
15521568
jobs:
15531569
- build-x86_64-linux:
1570+
cuda-version: << pipeline.parameters.cuda-version >>
15541571
torch-build: << pipeline.parameters.torch-build >>
15551572
torchvision-build: << pipeline.parameters.torchvision-build >>
15561573
torch-build-index: << pipeline.parameters.torch-build-index >>

0 commit comments

Comments
 (0)