diff --git a/.github/workflows/per-lib-check.yml b/.github/workflows/per-lib-check.yml new file mode 100644 index 0000000000..28c083189c --- /dev/null +++ b/.github/workflows/per-lib-check.yml @@ -0,0 +1,66 @@ +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: + matrix: + gpu_backend: ["cuda","hip_rocm"] + library: ["runtime", "ffi","compiler","kernels","op-attrs","pcg","substitutions","utils"] + 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/cuda-toolkit@v0.2.11 + 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" + + - 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: Build lib ${{ matrix.library }} + 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 + cores_available=$(nproc --all) + n_build_cores=$(( 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 + make -j $n_build_cores ${{ matrix.library }} + + + diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index f5d4c788af..f7c166f0dd 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,8 +1,8 @@ add_subdirectory(pcg) add_subdirectory(compiler) -# add_subdirectory(runtime) +add_subdirectory(runtime) add_subdirectory(op-attrs) add_subdirectory(kernels) add_subdirectory(utils) -# add_subdirectory(ffi) +add_subdirectory(ffi) add_subdirectory(substitutions)