Merge branch 'repo-refactor' into purge-moe #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "per-lib-checks" | |
on: [push, pull_request, workflow_dispatch] | |
concurrency: | |
group: build-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
cmake-build: | |
name: Library CMake Build | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
shell: bash -l {0} # required to use an activated conda environment | |
strategy: | |
max-parallel: 1 | |
matrix: | |
gpu_backend: ["cuda"] | |
fail-fast: false | |
steps: | |
- name: Checkout Git Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Free additional space on runner | |
run: .github/workflows/helpers/free_space_on_runner.sh | |
- name: Install CUDA | |
uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
cuda: "12.1.0" | |
# Disable caching of the CUDA binaries, since it does not give us any significant performance improvement | |
use-github-cache: "false" | |
linux-local-args: '["--toolkit"]' | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
- name: Install system dependencies | |
run: FF_GPU_BACKEND=${{ matrix.gpu_backend }} .github/workflows/helpers/install_dependencies.sh | |
# - name: Install conda and FlexFlow dependencies | |
# uses: conda-incubator/setup-miniconda@v2 | |
# with: | |
# activate-environment: flexflow | |
# environment-file: packaging/conda/environment.yml | |
# auto-activate-base: false | |
- name: Run cmake | |
run: | | |
export CUDNN_DIR=/usr/local/cuda | |
export CUDA_DIR=/usr/local/cuda | |
export FF_HOME=$(pwd) | |
export FF_GPU_BACKEND=${{ matrix.gpu_backend }} | |
export FF_CUDA_ARCH=70 | |
n_build_cores=$(( $(nproc) cores_available -1 )) | |
if (( $n_build_cores < 1 )) ; then n_build_cores=1 ; fi | |
mkdir build | |
cd build | |
#if [[ "${FF_GPU_BACKEND}" == "cuda" ]]; then | |
# export FF_BUILD_ALL_EXAMPLES=ON | |
# export FF_BUILD_UNIT_TESTS=ON | |
#fi | |
../config/config.linux -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache | |
- name: Build utils | |
run: | | |
cd build | |
make -j $(( $(nproc) < 2 ? 1 : $(nproc)-1 )) utils | |
- name: Build op-attrs | |
run: | | |
cd build | |
make -j $(( $(nproc) < 2 ? 1 : $(nproc)-1 )) op-attrs | |
- name: Build pcg | |
run: | | |
cd build | |
make -j $(( $(nproc) < 2 ? 1 : $(nproc)-1 )) pcg | |
- name: Build kernels | |
run: | | |
cd build | |
make -j $(( $(nproc) < 2 ? 1 : $(nproc)-1 )) kernels |