Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit c49768f

Browse files
authored
Revert "Cache OpenBLAS build to CUDA ARM Docker image " (#1844)
This reverts commit 87feb22.
1 parent fdaab5a commit c49768f

File tree

3 files changed

+40
-29
lines changed

3 files changed

+40
-29
lines changed

aarch64_linux/aarch64_wheel_ci_build.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,44 @@ def list_dir(path: str) -> List[str]:
1414
"""
1515
return check_output(["ls", "-1", path]).decode().split("\n")
1616

17+
18+
def build_OpenBLAS() -> None:
19+
'''
20+
Building OpenBLAS, because the package in many linux is old
21+
'''
22+
print('Building OpenBLAS')
23+
openblas_build_flags = [
24+
"NUM_THREADS=128",
25+
"USE_OPENMP=1",
26+
"NO_SHARED=0",
27+
"DYNAMIC_ARCH=1",
28+
"TARGET=ARMV8",
29+
"CFLAGS=-O3",
30+
]
31+
openblas_checkout_dir = "OpenBLAS"
32+
33+
check_call(
34+
[
35+
"git",
36+
"clone",
37+
"https://github.com/OpenMathLib/OpenBLAS.git",
38+
"-b",
39+
"v0.3.25",
40+
"--depth",
41+
"1",
42+
"--shallow-submodules",
43+
]
44+
)
45+
46+
check_call(["make", "-j8"]
47+
+ openblas_build_flags,
48+
cwd=openblas_checkout_dir)
49+
check_call(["make", "-j8"]
50+
+ openblas_build_flags
51+
+ ["install"],
52+
cwd=openblas_checkout_dir)
53+
54+
1755
def build_ArmComputeLibrary() -> None:
1856
"""
1957
Using ArmComputeLibrary for aarch64 PyTorch
@@ -189,6 +227,7 @@ def parse_arguments():
189227
elif branch.startswith(("v1.", "v2.")):
190228
build_vars += f"BUILD_TEST=0 PYTORCH_BUILD_VERSION={branch[1:branch.find('-')]} PYTORCH_BUILD_NUMBER=1 "
191229

230+
build_OpenBLAS()
192231
if enable_mkldnn:
193232
build_ArmComputeLibrary()
194233
print("build pytorch with mkldnn+acl backend")

common/install_openblas.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

manywheel/Dockerfile_cuda_aarch64

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,10 @@ ARG BASE_CUDA_VERSION
7474
ADD ./common/install_magma.sh install_magma.sh
7575
RUN bash ./install_magma.sh ${BASE_CUDA_VERSION} && rm install_magma.sh
7676

77-
FROM base as openblas
78-
# Install openblas
79-
ADD ./common/install_openblas.sh install_openblas.sh
80-
RUN bash ./install_openblas.sh && rm install_openblas.sh
81-
8277
FROM final as cuda_final
8378
ARG BASE_CUDA_VERSION
8479
RUN rm -rf /usr/local/cuda-${BASE_CUDA_VERSION}
8580
COPY --from=cuda /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}
8681
COPY --from=magma /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}
87-
COPY --from=openblas /opt/OpenBLAS/ /opt/OpenBLAS/
8882
RUN ln -sf /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda
89-
ENV PATH=/usr/local/cuda/bin:$PATH
90-
ENV LD_LIBRARY_PATH=/opt/OpenBLAS/lib:$LD_LIBRARY_PATH
83+
ENV PATH=/usr/local/cuda/bin:$PATH

0 commit comments

Comments
 (0)