Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refiled] IFU-main-2023-07-31 #1469

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
df95cf7
[ROCm] add dependencies for rocm5.1 (#1)
KyleCZH Mar 23, 2022
c44dfc0
[ROCm] install custom libdrm to silence missing amdgpu.ids warning
jeffdaily Apr 13, 2022
102ca3a
copy aux file amdgpu.ids
jeffdaily Apr 13, 2022
628d2ef
begin search for amdgpu.ids from install root, not lib
jeffdaily Apr 18, 2022
671b088
Merge pull request #2 from KyleCZH/libdrm_rocm_fix
jeffdaily Apr 19, 2022
4eb0de6
Merge branch 'main' into rocm_ifu_20220516
jeffdaily May 16, 2022
96c3fbd
Merge pull request #3 from ROCmSoftwarePlatform/rocm_ifu_20220516
jeffdaily May 16, 2022
558113c
refactor manywheel/build_rocm.sh
jeffdaily May 12, 2022
952e042
update manywheel/build_rocm.sh for ROCm 5.2
jeffdaily May 12, 2022
3474f5d
update scripts and Dockerfile for ROCm 5.2
jeffdaily May 12, 2022
87e5cef
update rocblas aux file list
jeffdaily May 13, 2022
7ee79d2
Merge pull request #4 from ROCmSoftwarePlatform/rocm_52_fork
jeffdaily May 16, 2022
156f24a
git224-core no longer available, use git236-core
jeffdaily May 25, 2022
d211ae1
add ROCm 5.1.3 AMDGPU support
jeffdaily May 25, 2022
af4f26f
Add 5.1.3 support for libtorch
pruthvistony May 26, 2022
0134ed6
update libamd_comgr.so path for ROCm5.2 (#5)
aspamidi Jun 8, 2022
36a5684
Add AMDGPU for ROCm5.2
jithunnair-amd Jun 29, 2022
0238135
Merge branch 'main' into main_rocm
jeffdaily Aug 11, 2022
b086528
reconcile common/install_rocm_drm.sh with upstream
jeffdaily Aug 11, 2022
68bacb6
Updates to support rocm5.3 wheel builds (#6)
pruthvistony Sep 1, 2022
fe0f987
Installing python before magma build
pruthvistony Sep 1, 2022
02688de
Move python install to libtorch/Dockerfile (#8)
jithunnair-amd Sep 12, 2022
5b83342
Merge remote-tracking branch 'origin/main' into IFU-main-2022-09-15
jithunnair-amd Sep 15, 2022
6b5b73e
Updating the condition for noRCCL build (#9)
pruthvistony Sep 22, 2022
8fc92e6
Merge pull request #10 from ROCmSoftwarePlatform/IFU-main-2022-09-15
jithunnair-amd Sep 22, 2022
5a0ae80
Disable MLIR when building MIOpen
jithunnair-amd Oct 4, 2022
bc6fe73
Merge pull request #11 from ROCmSoftwarePlatform/disable_miopen_mlir_…
jithunnair-amd Oct 5, 2022
42f213f
Use MIOpen branch for ROCm5.3; Change all conditions to -eq
jithunnair-amd Oct 5, 2022
0468db5
Merge pull request #12 from ROCmSoftwarePlatform/rocm5.3
jithunnair-amd Oct 5, 2022
c4d81fe
Use staging branch of MIOpen for ROCm5.3
jithunnair-amd Oct 5, 2022
55db5ba
Merge pull request #13 from ROCmSoftwarePlatform/use_miopen_rocm5.3_s…
jithunnair-amd Oct 5, 2022
594e241
Allow ROCm minor releases to use the same MIOpen branch as the major …
jithunnair-amd Oct 24, 2022
9b4cdd0
correct logic to ensure rocm5.4 doesn't fall in wrong condition
jithunnair-amd Oct 24, 2022
39f492a
Update for rocm5.4 branch
jithunnair-amd Oct 27, 2022
eac0e77
Update amdgpu repo url for ROCm5.3
jithunnair-amd Oct 27, 2022
a6f4604
Refactor wheel and libtorch build scripts (#7)
jataylo Oct 27, 2022
6dd80e4
rocfft/hipfft link to libhiprtc.so in ROCm5.4 (#15)
jithunnair-amd Oct 31, 2022
1cffc92
Disable MIOpen build from source for PyTorch wheels (#16)
jithunnair-amd Dec 1, 2022
7a44689
libtinfo.so version update and logic fix (#19)
jataylo Jan 19, 2023
fdad948
Fix conda install on distributions with strict POSIX sh (#18)
jataylo Jan 24, 2023
21cc230
Conditionalise librocfft-device so's out of rocm5.5 (#22)
jithunnair-amd Feb 14, 2023
c0632f3
Exit on missing file in build_rocm.sh (#23)
jataylo Feb 17, 2023
ae59a10
Merge remote-tracking branch 'upstream/main' into IFU-main-2023-03-03
jataylo Mar 3, 2023
24f9208
Remove building magma from source
jataylo Mar 3, 2023
23be9d1
Revert
jataylo Mar 6, 2023
17b7478
Remove rocm5.1 rocm5.2 from libtorch Dockerfile
jataylo Mar 7, 2023
82ccc1c
Add miopen install rpm script (#26)
jataylo Mar 10, 2023
009ed17
Merge branch 'upstream_main' into IFU-main-2023-03-24
pruthvistony Mar 28, 2023
be17939
Merge remote-tracking branch 'rocm_fork/IFU-main-2023-03-24' into roc…
jithunnair-amd Apr 11, 2023
df7f885
Update regex
jithunnair-amd May 10, 2023
9e02580
Update magma commits for various branches to include header path upda…
jithunnair-amd May 18, 2023
95b5af3
[SWDEV-404135] Add msccl-algorithms directory to PyTorch wheel (#32)
jithunnair-amd Jun 12, 2023
a133abe
Copy db files from rpm to ROCm install path (from https://github.com/…
jithunnair-amd May 12, 2023
3fe2e34
Set FORCE_RPATH for ROCm (#34)
jithunnair-amd Aug 4, 2023
f4464c9
Merge remote-tracking branch 'upstream/main' into IFU-main-2023-07-31
jithunnair-amd Aug 6, 2023
a581835
Fix erroneous logic that was skipping msccl files even for ROCm5.6; u…
jithunnair-amd Aug 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/install_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ver() {
}

# Map ROCm version to AMDGPU version
declare -A AMDGPU_VERSIONS=( ["5.0"]="21.50" ["5.1.1"]="22.10.1" ["5.2"]="22.20" )
declare -A AMDGPU_VERSIONS=( ["5.0"]="21.50" ["5.1.1"]="22.10.1" ["5.1.3"]="22.10.3" ["5.2"]="22.20" )

install_ubuntu() {
apt-get update
Expand Down
38 changes: 38 additions & 0 deletions common/install_rocm_miopen_rpm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -ex

# Create the tmp dir to extract into
EXTRACTDIR_ROOT=/extract_miopen_rpms
mkdir -p ${EXTRACTDIR_ROOT}
echo "Creating temporary directory for rpm download..."

MIOPEN_RPM_SOURCE_ARRAY=($MIOPEN_RPM_SOURCE)
# Fail if rpm source is not available
#if [[ ! wget -P ${EXTRACTDIR_ROOT} ${MIOPEN_RPM_SOURCE_ARRAY[0]} ]] || [[ ! wget -P ${EXTRACTDIR_ROOT} ${MIOPEN_RPM_SOURCE_ARRAY[1]} ]]; then
if ! wget -P ${EXTRACTDIR_ROOT} ${MIOPEN_RPM_SOURCE_ARRAY[0]} || ! wget -P ${EXTRACTDIR_ROOT} ${MIOPEN_RPM_SOURCE_ARRAY[1]}; then
echo 'ERROR: Failed to download MIOpen package.'
exit 1
fi
echo "MIOpen package download complete..."

# Extract rpm in EXTRACT_DIR
cd ${EXTRACTDIR_ROOT}
miopen_rpms=$(ls *.rpm)
for miopen_rpm in ${miopen_rpms}; do
rpm2cpio ${miopen_rpm} | cpio -idmv
done

# Copy libMIOpen.so, headers and db files over existing
files="lib/ include/ share/miopen/db/"
for file in $files; do
source="opt/rocm*/${file}/*"
dest="/opt/rocm/${file}"
# Use backslash to run cp in (non-aliased) non-interactive mode
\cp -dR $source $dest
done
echo "libMIOpen so file from RPM copied to existing MIOpen install..."

# Clean up extracted dir
rm -rf ${EXTRACTDIR_ROOT}
echo "Removed temporary directory..."
6 changes: 4 additions & 2 deletions manywheel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ ENV PATH=/usr/local/cuda/bin:$PATH
FROM cpu_final as rocm_final
ARG ROCM_VERSION=3.7
ARG PYTORCH_ROCM_ARCH
ARG PYTORCH_BRANCH
ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
# No need to install ROCm as base docker image should have full ROCm install
#ADD ./common/install_rocm.sh install_rocm.sh
Expand All @@ -168,5 +169,6 @@ RUN bash ./install_rocm_drm.sh && rm install_rocm_drm.sh
RUN ln -sf /usr/local/bin/cmake /usr/bin/cmake3
ADD ./common/install_rocm_magma.sh install_rocm_magma.sh
RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
ADD ./common/install_miopen.sh install_miopen.sh
RUN bash ./install_miopen.sh ${ROCM_VERSION} && rm install_miopen.sh
# Do not install miopen from source for ROCm fork until an env var is introduced to control the behavior
#ADD ./common/install_miopen.sh install_miopen.sh
#RUN bash ./install_miopen.sh ${ROCM_VERSION} && rm install_miopen.sh
15 changes: 12 additions & 3 deletions manywheel/build_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export USE_STATIC_NCCL=1
export ATEN_STATIC_CUDA=1
export USE_CUDA_STATIC_LINK=1
export INSTALL_TEST=0 # dont install test binaries into site-packages
# Set RPATH instead of RUNPATH when using patchelf to avoid LD_LIBRARY_PATH override
export FORCE_RPATH="--force-rpath"

# Keep an array of cmake variables to add to
if [[ -z "$CMAKE_ARGS" ]]; then
Expand Down Expand Up @@ -202,10 +204,17 @@ if [[ $ROCM_INT -ge 50500 ]]; then

DEPS_AUX_SRCLIST+=(${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_SRC/})
DEPS_AUX_DSTLIST+=(${MIOPEN_SHARE_FILES[@]/#/$MIOPEN_SHARE_DST/})
elif [[ $ROCM_INT -ge 50600 ]]; then
fi

if [[ $ROCM_INT -ge 50600 ]]; then
# RCCL library files
RCCL_SHARE_SRC=$ROCM_HOME/lib/msccl-algorithms
RCCL_SHARE_DST=lib/msccl-algorithms
if [[ $ROCM_INT -ge 50700 ]]; then
RCCL_SHARE_SRC=$ROCM_HOME/share/rccl/msccl-algorithms
RCCL_SHARE_DST=share/rccl/msccl-algorithms
else
RCCL_SHARE_SRC=$ROCM_HOME/lib/msccl-algorithms
RCCL_SHARE_DST=lib/msccl-algorithms
fi
RCCL_SHARE_FILES=($(ls $RCCL_SHARE_SRC))

DEPS_AUX_SRCLIST+=(${RCCL_SHARE_FILES[@]/#/$RCCL_SHARE_SRC/})
Expand Down
Loading