Skip to content

Commit

Permalink
setup aarch64 g++ compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
wkpark committed Feb 6, 2024
1 parent b397cbb commit b121116
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64' }}
run: |
# Allow cross-compile on aarch64
sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
sudo apt-get install -y g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Setup cmake
uses: jwlawson/[email protected]
Expand Down Expand Up @@ -79,6 +79,8 @@ jobs:
python3 -m pip install cmake==3.27.9 ninja
if [ "${{ matrix.os }}" = "windows-latest" ]; then
echo CXX_COMPILER=cl >> "$GITHUB_ENV"
elif [ "${{ matrix.os }}" = "ubuntu-latest" -a "${{ matrix.arch }}" == "aarch64" ]; then
echo CXX_COMPILER=aarch64-linux-gnu-g++ >> "$GITHUB_ENV"
else
echo CXX_COMPILER=g++ >> "$GITHUB_ENV"
fi
Expand Down Expand Up @@ -176,7 +178,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64' }}
run: |
# Allow cross-compile on aarch64
sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
sudo apt-get install -y g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: CUDA Toolkit
shell: bash -el {0}
Expand Down Expand Up @@ -205,6 +207,8 @@ jobs:
echo CXX_COMPILER=cl >> "$GITHUB_ENV"
# without -DCMAKE_CUDA_COMPILER=nvcc, cmake config always fail for cuda-11.8
echo DCMAKE_CUDA_COMPILER=-DCMAKE_CUDA_COMPILER=nvcc >> "$GITHUB_ENV"
elif [ "${{ matrix.os }}" = "ubuntu-latest" -a "${{ matrix.arch }}" == "aarch64" ]; then
echo CXX_COMPILER=aarch64-linux-gnu-g++ >> "$GITHUB_ENV"
else
echo CXX_COMPILER=g++ >> "$GITHUB_ENV"
fi
Expand Down Expand Up @@ -309,7 +313,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64' }}
run: |
# Allow cross-compile on aarch64
sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
sudo apt-get install -y g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: CUDA Toolkit
shell: bash -el {0}
Expand All @@ -321,7 +325,11 @@ jobs:
CUDA_HOME="${{ env.CONDA }}/envs/bnb-env"
echo CUDA_HOME=$CUDA_HOME >> "$GITHUB_ENV"
echo CUDA_PATH=$CUDA_HOME >> "$GITHUB_ENV"
echo CXX_COMPILER=g++ >> "$GITHUB_ENV"
if [ "${{ matrix.os }}" = "ubuntu-latest" -a "${{ matrix.arch }}" == "aarch64" ]; then
echo CXX_COMPILER=aarch64-linux-gnu-g++ >> "$GITHUB_ENV"
else
echo CXX_COMPILER=g++ >> "$GITHUB_ENV"
fi
nvcc --version
Expand Down

0 comments on commit b121116

Please sign in to comment.