Skip to content

Commit 8cc790e

Browse files
Switch Legion to master branch and update (#1622)
* Switch Legion to master branch and update. * Shut off Python build for now. * Replace Legion with Realm in CMake, remove prebuilt binaries, remove ucx dependency.
1 parent 3d36375 commit 8cc790e

File tree

5 files changed

+7
-266
lines changed

5 files changed

+7
-266
lines changed

.flake/pkgs/legion.nix

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
, stdenv
33
, fetchFromGitLab
44
, cmake
5-
, python3
65
, cudaPackages ? { }
76
, cudaCapabilities ? [ "60" "70" "80" "86" ]
87
, maxDim ? 5
@@ -17,37 +16,33 @@ let
1716
in
1817

1918
stdenv.mkDerivation rec {
20-
pname = "legion_flexflow";
21-
version = "2024-03-13";
19+
pname = "legion";
20+
version = "2025-01-06";
2221

2322
src = fetchFromGitLab {
2423
owner = "StanfordLegion";
2524
repo = "legion";
26-
rev = "24e8c452341dea41427e0ce61e154d61715e6835";
27-
sha256 = "sha256-NjCSjphOIew/V24i74I6DModSGcWKLeiSIjts3cFtx4=";
28-
fetchSubmodules = true;
25+
rev = "7be1abd0207eb1126c7629b16d1123fa6f58ce9d";
26+
sha256 = "sha256-gTjnGYYTQwTsrV1WcY0qqpTrlwbzAPcndurRy6XnG8A=";
2927
};
3028

3129
nativeBuildInputs = [
3230
cmake
3331
];
3432

3533
cmakeFlags = [
36-
"-DLegion_USE_Python=1"
37-
"-DLegion_BUILD_BINDINGS=1"
3834
"-DLegion_USE_CUDA=1"
3935
"-DLegion_CUDA_ARCH=${lib.concatStringsSep "," cudaCapabilities}"
4036
"-DLegion_MAX_DIM=${toString maxDim}"
4137
];
4238

4339
buildInputs = [
44-
python3
4540
cudatoolkit
4641
];
4742

4843
meta = with lib; {
4944
description = "Legion is a parallel programming model for distributed, heterogeneous machines";
50-
homepage = "https://github.com/StanfordLegion/legion";
45+
homepage = "https://legion.stanford.edu/";
5146
license = licenses.asl20;
5247
};
5348
}

CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,15 @@ set(FF_MAX_NUM_TASK_REGIONS "20" CACHE STRING
3333
set(FF_MAX_NUM_TASK_ARGUMENTS "5" CACHE STRING
3434
"Maximum number of arguments that can be declared in a TaskSignature")
3535
option(FF_USE_NCCL "Run FlexFlow with NCCL" OFF)
36-
option(FF_USE_PREBUILT_LEGION "Enable use of Legion pre-compiled library, if available" ON)
3736
option(FF_USE_ALL_PREBUILT_LIBRARIES "Enable use of all pre-compiled libraries, if available" OFF)
3837
option(FF_USE_PYTHON "Enable Python" ON)
3938
option(FF_BUILD_FROM_PYPI "Build from pypi" OFF)
4039
option(FF_USE_CODE_COVERAGE "Enable code coverage" OFF)
4140

42-
set(FF_GASNET_CONDUITS aries udp mpi ibv ucx)
43-
set(FF_GASNET_CONDUIT "mpi" CACHE STRING "Select GASNet conduit ${FF_GASNET_CONDUITS}")
44-
set_property(CACHE FF_GASNET_CONDUIT PROPERTY STRINGS ${FF_GASNET_CONDUITS})
45-
set(FF_LEGION_NETWORKS "" CACHE STRING "Network backend(s) to use")
46-
4741
set(FF_GPU_BACKENDS cuda hip_cuda hip_rocm intel)
4842
set(FF_GPU_BACKEND "cuda" CACHE STRING "Select GPU Backend ${FF_GPU_BACKENDS}")
4943
set_property(CACHE FF_GPU_BACKEND PROPERTY STRINGS ${FF_GPU_BACKENDS})
5044

51-
option(FF_USE_EXTERNAL_LEGION "Use pre-installed Legion" OFF)
5245
option(FF_USE_EXTERNAL_NCCL "Use pre-installed NCCL" OFF)
5346
option(FF_USE_EXTERNAL_JSON "Use pre-installed nlohmann::json" OFF)
5447
option(FF_USE_EXTERNAL_FMT "Use pre-installed fmt" OFF)
@@ -104,7 +97,7 @@ include(gbenchmark)
10497
include(libassert)
10598
include(CTest)
10699
include(fmt)
107-
include(legion)
100+
include(realm)
108101
include(rapidcheck)
109102
#include(gtest)
110103

cmake/legion.cmake

Lines changed: 0 additions & 161 deletions
This file was deleted.

cmake/realm.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
find_package(Realm REQUIRED)

cmake/ucx.cmake

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)