Skip to content

Commit c86f980

Browse files
committed
[BE] Cleanup split-build logic
1 parent 5fb744e commit c86f980

11 files changed

Lines changed: 190 additions & 449 deletions

.github/workflows/generate_binary_build_matrix.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ on:
5252
description: "A JSON-encoded list of python versions to build. An empty list means building all supported versions"
5353
default: "[]"
5454
type: string
55-
use_split_build:
56-
description: |
57-
[Experimental] Build a libtorch only wheel and build pytorch such that
58-
are built from the libtorch wheel.
59-
required: false
60-
type: boolean
61-
default: false
6255
getting-started:
6356
description: "Release matrix for getting started page"
6457
required: false
@@ -102,7 +95,6 @@ jobs:
10295
# In cases when pipy binaries are not published yet.
10396
USE_ONLY_DL_PYTORCH_ORG: ${{ inputs.use-only-dl-pytorch-org }}
10497
BUILD_PYTHON_ONLY: ${{ inputs.build-python-only }}
105-
USE_SPLIT_BUILD: ${{ inputs.use_split_build }}
10698
GETTING_STARTED: ${{ inputs.getting-started }}
10799
PYTHON_VERSIONS: ${{ inputs.python-versions }}
108100
run: |

.github/workflows/validate-binaries.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ on:
4242
default: false
4343
required: false
4444
type: boolean
45-
use_split_build:
46-
description: |
47-
[Experimental] Use Split Build
48-
required: false
49-
type: boolean
50-
default: false
5145
use-extra-index-url:
5246
description: 'Use extra-index url for pip tests'
5347
default: false
@@ -101,12 +95,6 @@ on:
10195
default: false
10296
required: false
10397
type: boolean
104-
use_split_build:
105-
description: |
106-
[Experimental] Use Split Build
107-
required: false
108-
type: boolean
109-
default: false
11098
use-extra-index-url:
11199
description: 'Use extra-index url for pip tests'
112100
default: false
@@ -143,7 +131,6 @@ jobs:
143131
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
144132
include-test-ops: ${{ inputs.include-test-ops }}
145133
use-only-dl-pytorch-org: ${{ inputs.use-only-dl-pytorch-org }}
146-
use_split_build: ${{ inputs.use_split_build }}
147134
use-extra-index-url: ${{ inputs.use-extra-index-url }}
148135
use-meta-cdn: ${{ inputs.use-meta-cdn }}
149136

.github/workflows/validate-linux-binaries.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ on:
4242
default: false
4343
required: false
4444
type: boolean
45-
use_split_build:
46-
description: |
47-
[Experimental] Use split build
48-
required: false
49-
type: boolean
50-
default: false
5145
use-extra-index-url:
5246
description: 'Use extra-index url for pip tests'
5347
default: false
@@ -94,12 +88,6 @@ on:
9488
default: false
9589
required: false
9690
type: boolean
97-
use_split_build:
98-
description: |
99-
[Experimental] Use split build
100-
required: false
101-
type: boolean
102-
default: false
10391
use-extra-index-url:
10492
description: 'Use extra-index url for pip tests'
10593
default: false
@@ -119,7 +107,6 @@ jobs:
119107
os: linux
120108
channel: ${{ inputs.channel }}
121109
use-only-dl-pytorch-org: ${{ inputs.use-only-dl-pytorch-org }}
122-
use_split_build: ${{ inputs.use_split_build }}
123110
with-xpu: enable
124111

125112
linux:

tools/scripts/generate_binary_build_matrix.py

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -275,21 +275,14 @@ def get_wheel_install_command(
275275
desired_cuda: str,
276276
python_version: str,
277277
use_only_dl_pytorch_org: bool,
278-
use_split_build: bool = False,
279278
getting_started: bool = False,
280279
) -> str:
281280
PACKAGES_TO_INSTALL = (
282281
PACKAGES_TO_INSTALL_GETTING_STARTED_WHL
283282
if getting_started
284283
else PACKAGES_TO_INSTALL_WHL
285284
)
286-
if use_split_build:
287-
if (gpu_arch_version in CUDA_ARCHES) and (os == LINUX) and (channel == NIGHTLY):
288-
return f"{WHL_INSTALL_BASE} {PACKAGES_TO_INSTALL} --index-url {get_base_download_url_for_repo('whl', channel, gpu_arch_type, desired_cuda)}_pypi_pkg" # noqa: E501
289-
else:
290-
raise ValueError(
291-
"Split build is not supported for this configuration. It is only supported for CUDA 11.8, 12.4, 12.6 on Linux nightly builds." # noqa: E501
292-
)
285+
293286
if (
294287
channel == RELEASE
295288
and (not use_only_dl_pytorch_org)
@@ -323,7 +316,6 @@ def generate_libtorch_matrix(
323316
with_xpu: str,
324317
limit_pr_builds: bool,
325318
use_only_dl_pytorch_org: bool,
326-
use_split_build: bool = False,
327319
python_versions: Optional[List[str]] = None,
328320
abi_versions: Optional[List[str]] = None,
329321
arches: Optional[List[str]] = None,
@@ -415,7 +407,6 @@ def generate_wheels_matrix(
415407
with_xpu: str,
416408
limit_pr_builds: bool,
417409
use_only_dl_pytorch_org: bool,
418-
use_split_build: bool = False,
419410
getting_started: bool = False,
420411
python_versions: Optional[List[str]] = None,
421412
arches: Optional[List[str]] = None,
@@ -491,29 +482,13 @@ def generate_wheels_matrix(
491482
desired_cuda,
492483
python_version,
493484
use_only_dl_pytorch_org,
494-
use_split_build,
495485
getting_started,
496486
),
497487
"channel": channel,
498488
"upload_to_base_bucket": upload_to_base_bucket,
499489
"stable_version": CURRENT_VERSION,
500-
"use_split_build": False,
501490
}
502491
ret.append(entry)
503-
if (
504-
use_split_build
505-
and (gpu_arch_version in CUDA_ARCHES)
506-
and (os == LINUX)
507-
and (channel == NIGHTLY)
508-
):
509-
entry = entry.copy()
510-
entry["build_name"] = (
511-
f"{package_type}-py{python_version}-{gpu_arch_type}{gpu_arch_version}-split".replace(
512-
".", "_"
513-
)
514-
)
515-
entry["use_split_build"] = True
516-
ret.append(entry)
517492

518493
return ret
519494

@@ -535,7 +510,6 @@ def generate_build_matrix(
535510
limit_pr_builds: str,
536511
use_only_dl_pytorch_org: str,
537512
build_python_only: str,
538-
use_split_build: str = "false",
539513
getting_started: str = "false",
540514
python_versions: Optional[List[str]] = None,
541515
) -> Dict[str, List[Dict[str, str]]]:
@@ -560,7 +534,6 @@ def generate_build_matrix(
560534
with_xpu,
561535
limit_pr_builds == "true",
562536
use_only_dl_pytorch_org == "true",
563-
use_split_build == "true",
564537
getting_started == "true",
565538
python_versions,
566539
)
@@ -649,14 +622,6 @@ def main(args: List[str]) -> None:
649622
default=os.getenv("BUILD_PYTHON_ONLY", ENABLE),
650623
)
651624

652-
parser.add_argument(
653-
"--use-split-build",
654-
help="Use split build for wheel",
655-
type=str,
656-
choices=["true", "false"],
657-
default=os.getenv("USE_SPLIT_BUILD", DISABLE),
658-
)
659-
660625
parser.add_argument(
661626
"--getting-started",
662627
help="Matrix for getting started page",
@@ -693,7 +658,6 @@ def main(args: List[str]) -> None:
693658
options.limit_pr_builds,
694659
options.use_only_dl_pytorch_org,
695660
options.build_python_only,
696-
options.use_split_build,
697661
options.getting_started,
698662
python_versions,
699663
)

0 commit comments

Comments
 (0)