Skip to content

Commit f0df0b9

Browse files
authored
chore: remove pre-cxx11 abi (#3473)
1 parent 4cc9e3b commit f0df0b9

File tree

55 files changed

+131
-496
lines changed

Some content is hidden

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

55 files changed

+131
-496
lines changed

.bazelrc

-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ build:cxx11_abi --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1"
3636
build:cxx11_abi --linkopt="-D_GLIBCXX_USE_CXX11_ABI=1"
3737
build:cxx11_abi --define=abi=cxx11_abi
3838

39-
build:pre_cxx11_abi --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0"
40-
build:pre_cxx11_abi --linkopt="-D_GLIBCXX_USE_CXX11_ABI=0"
41-
build:pre_cxx11_abi --define=abi=pre_cxx11_abi
42-
4339
build:ci_testing --define=torchtrt_src=prebuilt --cxxopt="-DDISABLE_TEST_IN_CI" --action_env "NVIDIA_TF32_OVERRIDE=0"
4440
build:use_precompiled_torchtrt --define=torchtrt_src=prebuilt
4541

.github/scripts/generate_binary_build_matrix.py

+7-18
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
}
3737

3838
PACKAGE_TYPES = ["wheel", "conda", "libtorch"]
39-
PRE_CXX11_ABI = "pre-cxx11"
4039
CXX11_ABI = "cxx11-abi"
4140
RELEASE = "release"
4241
DEBUG = "debug"
@@ -141,39 +140,29 @@ def initialize_globals(channel: str, build_python_only: bool) -> None:
141140
else:
142141
PYTHON_ARCHES = PYTHON_ARCHES_DICT[channel]
143142
WHEEL_CONTAINER_IMAGES = {
144-
"11.8": "pytorch/manylinux2_28-builder:cuda11.8",
145-
"12.1": "pytorch/manylinux2_28-builder:cuda12.1",
146-
"12.4": "pytorch/manylinux2_28-builder:cuda12.4",
147-
"12.6": "pytorch/manylinux2_28-builder:cuda12.6",
148-
"12.8": "pytorch/manylinux2_28-builder:cuda12.8",
143+
**{
144+
gpu_arch: f"pytorch/manylinux2_28-builder:cuda{gpu_arch}"
145+
for gpu_arch in CUDA_ARCHES
146+
},
149147
**{
150148
gpu_arch: f"pytorch/manylinux2_28-builder:rocm{gpu_arch}"
151149
for gpu_arch in ROCM_ARCHES
152150
},
153151
CPU: "pytorch/manylinux2_28-builder:cpu",
154152
XPU: "pytorch/manylinux2_28-builder:xpu",
155-
# TODO: Migrate CUDA_AARCH64 image to manylinux2_28_aarch64-builder:cuda12.4
153+
# TODO: Migrate CUDA_AARCH64 image to manylinux2_28_aarch64-builder:cuda12.6
156154
CPU_AARCH64: "pytorch/manylinux2_28_aarch64-builder:cpu-aarch64",
157-
CUDA_AARCH64: "pytorch/manylinuxaarch64-builder:cuda12.4",
155+
CUDA_AARCH64: "pytorch/manylinuxaarch64-builder:cuda12.6",
158156
}
159157
LIBTORCH_CONTAINER_IMAGES = {
160-
**{
161-
(gpu_arch, PRE_CXX11_ABI): f"pytorch/manylinux2_28-builder:cuda{gpu_arch}"
162-
for gpu_arch in CUDA_ARCHES
163-
},
164158
**{
165159
(gpu_arch, CXX11_ABI): f"pytorch/libtorch-cxx11-builder:cuda{gpu_arch}"
166160
for gpu_arch in CUDA_ARCHES
167161
},
168-
**{
169-
(gpu_arch, PRE_CXX11_ABI): f"pytorch/manylinux2_28-builder:rocm{gpu_arch}"
170-
for gpu_arch in ROCM_ARCHES
171-
},
172162
**{
173163
(gpu_arch, CXX11_ABI): f"pytorch/libtorch-cxx11-builder:rocm{gpu_arch}"
174164
for gpu_arch in ROCM_ARCHES
175165
},
176-
(CPU, PRE_CXX11_ABI): "pytorch/manylinux2_28-builder:cpu",
177166
(CPU, CXX11_ABI): "pytorch/libtorch-cxx11-builder:cpu",
178167
}
179168

@@ -344,7 +333,7 @@ def generate_libtorch_matrix(
344333
if os == WINDOWS:
345334
abi_versions = [RELEASE, DEBUG]
346335
elif os == LINUX:
347-
abi_versions = [PRE_CXX11_ABI, CXX11_ABI]
336+
abi_versions = [CXX11_ABI]
348337
elif os in [MACOS_ARM64]:
349338
abi_versions = [CXX11_ABI]
350339
else:

.github/workflows/docgen.yml

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
id: vars
4242
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
4343
- name: Build Python Package
44-
env:
45-
USE_PRE_CXX11_ABI: 0
4644
run: |
4745
python3 -m pip install --pre . --extra-index-url https://download.pytorch.org/whl/nightly/cu128
4846
- name: Generate New Docs

.github/workflows/release-linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ jobs:
9696
echo "${MATRIX_BLOB}"
9797
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
9898
99-
release-other-artifacts:
100-
name: Release torch-tensorrt wheel and pre-cxx11 tarball artifacts
99+
release-wheel-artifacts:
100+
name: Release torch-tensorrt wheel artifacts
101101
needs: [generate-release-wheel-matrix]
102102
strategy:
103103
fail-fast: false

.github/workflows/release-wheel-linux.yml

-11
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,6 @@ jobs:
204204
release/tarball/libtorchtrt-${BUILD_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION:2}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz
205205
else
206206
${CONDA_RUN} python setup.py bdist_wheel --release
207-
208-
cp bazel-bin/libtorchtrt.tar.gz \
209-
release/tarball/libtorchtrt-${BUILD_VERSION}-pre-cxx11-abi-tensorrt${TRT_VERSION}-cuda${CU_VERSION:2}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz
210-
211207
${CONDA_RUN} python -m pip install auditwheel
212208
${CONDA_RUN} python -m auditwheel repair \
213209
$(cat py/ci/soname_excludes.params) \
@@ -240,13 +236,6 @@ jobs:
240236
with:
241237
name: ${{ env.ARTIFACT_NAME }}
242238
path: ${{ inputs.repository }}/release/wheel/
243-
- name: Upload pre-cxx11 tarball to GitHub
244-
if: ${{ inputs.cxx11-tarball-release != 'true' && env.PYTHON_VERSION == '3.11' }}
245-
continue-on-error: true
246-
uses: actions/upload-artifact@v4
247-
with:
248-
name: pre-cxx11-tarball-${{ env.PYTHON_VERSION }}-${{ env.CU_VERSION }}
249-
path: ${{ inputs.repository }}/release/tarball/
250239
- name: Upload cxx11 tarball to GitHub
251240
if: ${{ inputs.cxx11-tarball-release == 'true' }}
252241
continue-on-error: true

CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ Environment variables supported by nox
7575
```
7676
PYT_PATH - To use different PYTHONPATH than system installed Python packages
7777
TOP_DIR - To set the root directory of the noxfile
78-
USE_PRE_CXX11 - To use pre_cxx11_abi (Defaults to 0)
7978
USE_HOST_DEPS - To use host dependencies for tests (Defaults to 0)
8079
```
8180

MODULE.bazel

+1-19
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ http_archive(
5858
urls = ["https://download.pytorch.org/libtorch/nightly/cu128/libtorch-cxx11-abi-shared-with-deps-latest.zip"],
5959
)
6060

61-
http_archive(
62-
name = "libtorch_pre_cxx11_abi",
63-
build_file = "@//third_party/libtorch:BUILD",
64-
strip_prefix = "libtorch",
65-
urls = ["https://download.pytorch.org/libtorch/nightly/cu128/libtorch-shared-with-deps-latest.zip"],
66-
)
67-
6861
http_archive(
6962
name = "libtorch_win",
7063
build_file = "@//third_party/libtorch:BUILD",
@@ -98,25 +91,14 @@ http_archive(
9891
# Locally installed dependencies (use in cases of custom dependencies or aarch64)
9992
####################################################################################
10093

101-
# NOTE: In the case you are using just the pre-cxx11-abi path or just the cxx11 abi path
102-
# with your local libtorch, just point deps at the same path to satisfy bazel.
103-
104-
# NOTE: NVIDIA's aarch64 PyTorch (python) wheel file uses the CXX11 ABI unlike PyTorch's standard
105-
# x86_64 python distribution. If using NVIDIA's version just point to the root of the package
106-
# for both versions here and do not use --config=pre-cxx11-abi
94+
# NOTE: If you are using a local build of torch, just point the Libtorch dep to that path.
10795

10896
#new_local_repository(
10997
# name = "libtorch",
11098
# path = "/usr/local/lib/python3.6/dist-packages/torch",
11199
# build_file = "third_party/libtorch/BUILD"
112100
#)
113101

114-
#new_local_repository(
115-
# name = "libtorch_pre_cxx11_abi",
116-
# path = "/usr/local/lib/python3.6/dist-packages/torch",
117-
# build_file = "third_party/libtorch/BUILD"
118-
#)
119-
120102
#new_local_repository(
121103
# name = "tensorrt",
122104
# path = "/usr/",

core/BUILD

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
33

44
package(default_visibility = ["//visibility:public"])
55

6-
config_setting(
7-
name = "use_pre_cxx11_abi",
8-
values = {
9-
"define": "abi=pre_cxx11_abi",
10-
},
11-
)
12-
136
config_setting(
147
name = "python_core",
158
values = {
@@ -39,9 +32,14 @@ cc_library(
3932
"//core/runtime",
4033
"//core/util/logging",
4134
] + select({
42-
":windows": ["@tensorrt_win//:nvinfer", "@libtorch_win//:libtorch"],
43-
":use_pre_cxx11_abi": ["@tensorrt//:nvinfer", "@libtorch_pre_cxx11_abi//:libtorch"],
44-
"//conditions:default": ["@tensorrt//:nvinfer", "@libtorch"],
35+
":windows": [
36+
"@libtorch_win//:libtorch",
37+
"@tensorrt_win//:nvinfer",
38+
],
39+
"//conditions:default": [
40+
"@libtorch",
41+
"@tensorrt//:nvinfer",
42+
],
4543
}),
4644
alwayslink = True,
4745
)

core/conversion/BUILD

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
33

44
package(default_visibility = ["//visibility:public"])
55

6-
config_setting(
7-
name = "use_pre_cxx11_abi",
8-
values = {
9-
"define": "abi=pre_cxx11_abi",
10-
},
11-
)
12-
136
config_setting(
147
name = "windows",
158
constraint_values = [
@@ -34,9 +27,14 @@ cc_library(
3427
"//core/ir",
3528
"//core/util:prelude",
3629
] + select({
37-
":windows": ["@tensorrt_win//:nvinfer", "@libtorch_win//:libtorch"],
38-
":use_pre_cxx11_abi": ["@tensorrt//:nvinfer", "@libtorch_pre_cxx11_abi//:libtorch"],
39-
"//conditions:default": ["@tensorrt//:nvinfer", "@libtorch"],
30+
":windows": [
31+
"@libtorch_win//:libtorch",
32+
"@tensorrt_win//:nvinfer",
33+
],
34+
"//conditions:default": [
35+
"@libtorch",
36+
"@tensorrt//:nvinfer",
37+
],
4038
}),
4139
alwayslink = True,
4240
)

core/conversion/conversionctx/BUILD

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
33

44
package(default_visibility = ["//visibility:public"])
55

6-
config_setting(
7-
name = "use_pre_cxx11_abi",
8-
values = {
9-
"define": "abi=pre_cxx11_abi",
10-
},
11-
)
12-
136
config_setting(
147
name = "windows",
158
constraint_values = [
@@ -29,9 +22,14 @@ cc_library(
2922
"//core/ir",
3023
"//core/util:prelude",
3124
] + select({
32-
":windows": ["@tensorrt_win//:nvinfer", "@libtorch_win//:libtorch"],
33-
":use_pre_cxx11_abi": ["@tensorrt//:nvinfer", "@libtorch_pre_cxx11_abi//:libtorch"],
34-
"//conditions:default": ["@tensorrt//:nvinfer", "@libtorch"],
25+
":windows": [
26+
"@libtorch_win//:libtorch",
27+
"@tensorrt_win//:nvinfer",
28+
],
29+
"//conditions:default": [
30+
"@libtorch",
31+
"@tensorrt//:nvinfer",
32+
],
3533
}),
3634
alwayslink = True,
3735
)

core/conversion/converters/BUILD

+24-16
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
33

44
package(default_visibility = ["//visibility:public"])
55

6-
config_setting(
7-
name = "use_pre_cxx11_abi",
8-
values = {
9-
"define": "abi=pre_cxx11_abi",
10-
},
11-
)
12-
136
config_setting(
147
name = "windows",
158
constraint_values = [
@@ -29,9 +22,14 @@ cc_library(
2922
"//core/conversion/conversionctx",
3023
"//core/util:prelude",
3124
] + select({
32-
":windows": ["@tensorrt_win//:nvinfer", "@libtorch_win//:libtorch"],
33-
":use_pre_cxx11_abi": ["@tensorrt//:nvinfer", "@libtorch_pre_cxx11_abi//:libtorch"],
34-
"//conditions:default": ["@tensorrt//:nvinfer", "@libtorch"],
25+
":windows": [
26+
"@libtorch_win//:libtorch",
27+
"@tensorrt_win//:nvinfer",
28+
],
29+
"//conditions:default": [
30+
"@libtorch",
31+
"@tensorrt//:nvinfer",
32+
],
3533
}),
3634
alwayslink = True,
3735
)
@@ -49,9 +47,14 @@ cc_library(
4947
"//core/conversion/conversionctx",
5048
"//core/util:prelude",
5149
] + select({
52-
":windows": ["@tensorrt_win//:nvinfer", "@libtorch_win//:libtorch"],
53-
":use_pre_cxx11_abi": ["@tensorrt//:nvinfer", "@libtorch_pre_cxx11_abi//:libtorch"],
54-
"//conditions:default": ["@tensorrt//:nvinfer", "@libtorch"],
50+
":windows": [
51+
"@libtorch_win//:libtorch",
52+
"@tensorrt_win//:nvinfer",
53+
],
54+
"//conditions:default": [
55+
"@libtorch",
56+
"@tensorrt//:nvinfer",
57+
],
5558
}),
5659
alwayslink = True,
5760
)
@@ -106,9 +109,14 @@ cc_library(
106109
"//core/plugins:torch_tensorrt_plugins",
107110
"//core/util:prelude",
108111
] + select({
109-
":windows": ["@tensorrt_win//:nvinfer", "@libtorch_win//:libtorch"],
110-
":use_pre_cxx11_abi": ["@tensorrt//:nvinfer", "@libtorch_pre_cxx11_abi//:libtorch"],
111-
"//conditions:default": ["@tensorrt//:nvinfer", "@libtorch"],
112+
":windows": [
113+
"@libtorch_win//:libtorch",
114+
"@tensorrt_win//:nvinfer",
115+
],
116+
"//conditions:default": [
117+
"@libtorch",
118+
"@tensorrt//:nvinfer",
119+
],
112120
}),
113121
alwayslink = True,
114122
)

core/conversion/evaluators/BUILD

-8
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
33

44
package(default_visibility = ["//visibility:public"])
55

6-
config_setting(
7-
name = "use_pre_cxx11_abi",
8-
values = {
9-
"define": "abi=pre_cxx11_abi",
10-
},
11-
)
12-
136
config_setting(
147
name = "windows",
158
constraint_values = [
@@ -36,7 +29,6 @@ cc_library(
3629
"//core/util:prelude",
3730
] + select({
3831
":windows": ["@libtorch_win//:libtorch"],
39-
":use_pre_cxx11_abi": ["@libtorch_pre_cxx11_abi//:libtorch"],
4032
"//conditions:default": ["@libtorch"],
4133
}),
4234
alwayslink = True,

core/conversion/tensorcontainer/BUILD

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
33

44
package(default_visibility = ["//visibility:public"])
55

6-
config_setting(
7-
name = "use_pre_cxx11_abi",
8-
values = {
9-
"define": "abi=pre_cxx11_abi",
10-
},
11-
)
12-
136
config_setting(
147
name = "windows",
158
constraint_values = [
@@ -28,9 +21,14 @@ cc_library(
2821
deps = [
2922
"//core/util:prelude",
3023
] + select({
31-
":windows": ["@tensorrt_win//:nvinfer", "@libtorch_win//:libtorch"],
32-
":use_pre_cxx11_abi": ["@tensorrt//:nvinfer", "@libtorch_pre_cxx11_abi//:libtorch"],
33-
"//conditions:default": ["@tensorrt//:nvinfer", "@libtorch"],
24+
":windows": [
25+
"@libtorch_win//:libtorch",
26+
"@tensorrt_win//:nvinfer",
27+
],
28+
"//conditions:default": [
29+
"@libtorch",
30+
"@tensorrt//:nvinfer",
31+
],
3432
}),
3533
alwayslink = True,
3634
)

0 commit comments

Comments
 (0)