Skip to content

Commit

Permalink
fixup arm
Browse files Browse the repository at this point in the history
  • Loading branch information
olupton committed Aug 19, 2024
1 parent 88d5010 commit 249fb7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/container/install-cudnn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@ if [[ -d "${prefix}" ]]; then
echo "Skipping link farm creation"
exit 1
fi
arch=$(uname -m)-linux-gnu
for cudnn_file in $(dpkg -L ${libcudnn_name} ${libcudnn_dev_name} | sort -u); do
# Real files and symlinks are linked into $prefix
if [[ -f "${cudnn_file}" || -h "${cudnn_file}" ]]; then
# Replace /usr with $prefix
nosysprefix="${cudnn_file#"/usr/"}"
# include/x86_64-linux-gpu -> include/
noarchinclude="${nosysprefix/#"include/x86_64-linux-gnu"/include}"
noarchinclude="${nosysprefix/#"include/${arch}"/include}"
# cudnn_v9.h -> cudnn.h
noverheader="${noarchinclude/%"_v${CUDNN_MAJOR_VERSION}.h"/.h}"
# lib/x86_64-linux-gnu -> lib/
noarchlib="${noverheader/#"lib/x86_64-linux-gnu"/lib}"
noarchlib="${noverheader/#"lib/${arch}"/lib}"
link_name="${prefix}/${noarchlib}"
link_dir=$(dirname "${link_name}")
mkdir -p "${link_dir}"
Expand Down
3 changes: 2 additions & 1 deletion .github/container/install-nccl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ if [[ -d "${prefix}" ]]; then
echo "Skipping link farm creation"
exit 1
fi
arch=$(uname -m)-linux-gnu
for nccl_file in $(dpkg -L libnccl2 libnccl-dev | sort -u); do
# Real files and symlinks are linked into $prefix
if [[ -f "${nccl_file}" || -h "${nccl_file}" ]]; then
# Replace /usr with $prefix and remove arch-specific lib directories
nosysprefix="${nccl_file#"/usr/"}"
noarchlib="${nosysprefix/#"lib/x86_64-linux-gnu"/lib}"
noarchlib="${nosysprefix/#"lib/${arch}"/lib}"
link_name="${prefix}/${noarchlib}"
link_dir=$(dirname "${link_name}")
mkdir -p "${link_dir}"
Expand Down

0 comments on commit 249fb7c

Please sign in to comment.