Skip to content

Commit 0516df1

Browse files
zhuhong61guoyejun
andcommitted
Add new checks in CI system to verify the built linux pip wheel with cpu-cxx11-abi
Co-authored-by: Zhu Hong <hong.zhu@intel.com> Co-authored-by: Guo Yejun <yejun.guo@intel.com>
1 parent 3c6bddc commit 0516df1

2 files changed

Lines changed: 293 additions & 2 deletions

File tree

.github/scripts/generate_binary_build_matrix.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@
1919
ROCM_ARCHES = ["5.1.1", "5.2"]
2020

2121

22+
CPU_CXX11_ABI_ARCH = ['cpu-cxx11-abi']
23+
2224
def arch_type(arch_version: str) -> str:
2325
if arch_version in CUDA_ARCHES:
2426
return "cuda"
2527
elif arch_version in ROCM_ARCHES:
2628
return "rocm"
29+
elif arch_version in CPU_CXX11_ABI_ARCH:
30+
return "cpu-cxx11-abi"
2731
else: # arch_version should always be "cpu" in this case
2832
return "cpu"
2933

@@ -38,6 +42,7 @@ def arch_type(arch_version: str) -> str:
3842
for gpu_arch in ROCM_ARCHES
3943
},
4044
"cpu": "pytorch/manylinux-builder:cpu",
45+
"cpu-cxx11-abi": "pytorch/manylinuxcxx11-abi-builder:cpu-cxx11-abi",
4146
}
4247

4348
CONDA_CONTAINER_IMAGES = {
@@ -77,6 +82,7 @@ def arch_type(arch_version: str) -> str:
7782
def translate_desired_cuda(gpu_arch_type: str, gpu_arch_version: str) -> str:
7883
return {
7984
"cpu": "cpu",
85+
"cpu-cxx11-abi": "cpu-cxx11-abi",
8086
"cuda": f"cu{gpu_arch_version.replace('.', '')}",
8187
"rocm": f"rocm{gpu_arch_version}",
8288
}.get(gpu_arch_type, gpu_arch_version)
@@ -192,15 +198,15 @@ def generate_wheels_matrix(os: str,
192198
# Define default compute archivectures
193199
arches = ["cpu"]
194200
if os == "linux":
195-
arches += CUDA_ARCHES + ROCM_ARCHES
201+
arches += CPU_CXX11_ABI_ARCH + CUDA_ARCHES + ROCM_ARCHES
196202
elif os == "windows":
197203
arches += CUDA_ARCHES
198204

199205
ret: List[Dict[str, str]] = []
200206
for python_version in python_versions:
201207
for arch_version in arches:
202208
gpu_arch_type = arch_type(arch_version)
203-
gpu_arch_version = "" if arch_version == "cpu" else arch_version
209+
gpu_arch_version = "" if arch_version == "cpu" or arch_version == "cpu-cxx11-abi" else arch_version
204210
# Skip rocm 3.11 binaries for now as the docker image are not correct
205211
if python_version == "3.11" and gpu_arch_type == "rocm":
206212
continue

.github/workflows/generated-linux-binary-manywheel-nightly.yml

Lines changed: 285 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)