Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 66 additions & 0 deletions .github/workflows/per-lib-check.yml
Original file line number Diff line number Diff line change
@@ -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 }}



4 changes: 2 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)