This repository was archived by the owner on Aug 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-19
lines changed Expand file tree Collapse file tree 4 files changed +12
-19
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ set -ex
44# MKL
55MKL_VERSION=2024.2.0
66
7- mkdir -p /opt/intel/
7+ mkdir -p ${MKLROOT}
88pushd /tmp
99
1010python3 -mpip install wheel
1111python3 -mpip download -d . mkl-static==${MKL_VERSION}
1212python3 -m wheel unpack mkl_static-${MKL_VERSION} -py2.py3-none-manylinux1_x86_64.whl
1313python3 -m wheel unpack mkl_include-${MKL_VERSION} -py2.py3-none-manylinux1_x86_64.whl
14- mv mkl_static-${MKL_VERSION} /mkl_static-${MKL_VERSION} .data/data/lib /opt/intel/
15- mv mkl_include-${MKL_VERSION} /mkl_include-${MKL_VERSION} .data/data/include /opt/intel/
14+ mv mkl_static-${MKL_VERSION} /mkl_static-${MKL_VERSION} .data/data/lib ${MKLROOT}
15+ mv mkl_include-${MKL_VERSION} /mkl_include-${MKL_VERSION} .data/data/include ${MKLROOT}
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # TODO upstream differences from this file is into the (eventual) one in pytorch
4- # - (1) check for static lib mkl
5- # - (2) MKLROOT as env var
6-
73set -ex
84
9- # TODO (2)
10- MKLROOT=${MKLROOT:-/ opt/ intel}
11-
5+ MKLROOT=${MKLROOT:-/ opt/ conda/ envs/ py_$ANACONDA_PYTHON_VERSION }
126# "install" hipMAGMA into /opt/rocm/magma by copying after build
137git clone https://bitbucket.org/icl/magma.git
148pushd magma
15- if [[ $PYTORCH_BRANCH == " release/1.10.1" ]]; then
16- git checkout magma_ctrl_launch_bounds
17- else
18- git checkout a1625ff4d9bc362906bd01f805dbbe12612953f6
19- fi
9+
10+ # Version 2.7.2 + ROCm related updates
11+ git checkout a1625ff4d9bc362906bd01f805dbbe12612953f6
12+
2013cp make.inc-examples/make.inc.hip-gcc-mkl make.inc
2114echo ' LIBDIR += -L$(MKLROOT)/lib' >> make.inc
22- # TODO (1)
2315if [[ -f " ${MKLROOT} /lib/libmkl_core.a" ]]; then
2416 echo ' LIB = -Wl,--start-group -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -Wl,--end-group -lpthread -lstdc++ -lm -lgomp -lhipblas -lhipsparse' >> make.inc
2517fi
Original file line number Diff line number Diff line change 11ARG BASE_TARGET=base
22ARG GPU_IMAGE=ubuntu:20.04
3+ ARG MKLROOT /opt/intel
34FROM ${GPU_IMAGE} as base
45
56ENV DEBIAN_FRONTEND=noninteractive
@@ -69,8 +70,7 @@ RUN ln -sf /usr/local/cuda-12.4 /usr/local/cuda
6970FROM cpu as rocm
7071ARG PYTORCH_ROCM_ARCH
7172ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
72- ENV MKLROOT /opt/intel
73- # Adding ROCM_PATH env var so that LoadHip.cmake (even with logic updated for ROCm6.0)
73+ # Adding ROCM_PATH env var so that LoadHip.cmake (even with logic updated for ROCm6.0)
7474# find HIP works for ROCm5.7. Not needed for ROCm6.0 and above.
7575# Remove below when ROCm5.7 is not in support matrix anymore.
7676ENV ROCM_PATH /opt/rocm
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ ARG ROCM_VERSION=3.7
33ARG BASE_CUDA_VERSION=11.8
44
55ARG GPU_IMAGE=centos:7
6+ ARG MKLROOT=/opt/intel
67FROM centos:7 as base
78
89ENV LC_ALL en_US.UTF-8
@@ -131,7 +132,7 @@ COPY --from=openssl /opt/openssl /opt/openss
131132COPY --from=python /opt/python /opt/python
132133COPY --from=python /opt/_internal /opt/_internal
133134COPY --from=python /opt/python/cp39-cp39/bin/auditwheel /usr/local/bin/auditwheel
134- COPY --from=intel /opt/intel /opt/intel
135+ COPY --from=intel ${MKLROOT} ${MKLROOT}
135136COPY --from=patchelf /usr/local/bin/patchelf /usr/local/bin/patchelf
136137COPY --from=jni /usr/local/include/jni.h /usr/local/include/jni.h
137138COPY --from=libpng /usr/local/bin/png* /usr/local/bin/
You can’t perform that action at this time.
0 commit comments