Skip to content

Commit

Permalink
added build path and legion-only flag
Browse files Browse the repository at this point in the history
  • Loading branch information
DerrickYLJ committed Jul 26, 2023
1 parent eb04a78 commit 35f02a7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
43 changes: 41 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ concurrency:
cancel-in-progress: true

jobs:
cmake-build:
name: Build FlexFlow with CMake
prebuild-legion:
name: Prebuild Legion with CMake
runs-on: ubuntu-20.04
defaults:
run:
Expand Down Expand Up @@ -95,11 +95,50 @@ jobs:
# extract LEGION tarball file
export LEGION_TARBALL="legion_${{ matrix.os }}_${{ matrix.gpu_backend }}.tar.gz"
# create and export the installation path
mkdir -p export/legion
export INSTALL_DIR="build/export/legion/"
echo "Creating archive $LEGION_TARBALL"
tar -zcvf $LEGION_TARBALL build/export/legion/
echo "Checking the size of the Legion tarball..."
du -h $LEGION_TARBALL
cmake-build:
name: Build FlexFlow with CMake
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"]
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: "11.8.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: conda/environment.yml
auto-activate-base: false

- name: Build FlexFlow
run: |
Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ option(BUILD_SHARED_LIBS "Build shared libraries instead of static ones" ON)
# option for using Python
option(FF_USE_PYTHON "Enable Python" ON)

# option for using Python
option(BUILD_LEGION_ONLY "Build Legion only" OFF)

# option to download pre-compiled NCCL/Legion libraries
option(FF_USE_PREBUILT_NCCL "Enable use of NCCL pre-compiled library, if available" ON)
option(FF_USE_PREBUILT_LEGION "Enable use of Legion pre-compiled library, if available" ON)
Expand Down Expand Up @@ -231,10 +234,13 @@ if(FF_USE_NCCL)
-DFF_USE_NCCL)
endif()

# Legion
if(FF_BUILD_LEGION)
# Build Legion only, not build FlexFlow
if(BUILD_LEGION_ONLY)
include(legion)
else()
# legion
include(legion)

# json
include(json)

Expand Down

0 comments on commit 35f02a7

Please sign in to comment.