From c939223a8c624e9699fa957f62b655b37c89b4aa Mon Sep 17 00:00:00 2001 From: Elliott Slaughter Date: Tue, 6 Feb 2024 14:16:19 -0800 Subject: [PATCH 1/4] Remove unnecessary flags in Legion CMake build (#932) * Remove unnecessary flags in Legion CMake build. The flag --root here is a workaround for buggy behavior in `pip install` where pip would ignore the --prefix setting when --global-option was supplied. As it turns out, --global-option is deprecated anyway so we removed in Legion. As a result, this is no longer required; the prefix is already set in the upstream project and the need for --root goes away with the removal of --global-option. See this Legion MR for details: https://gitlab.com/StanfordLegion/legion/-/merge_requests/1072 * Make sure to use the latest Legion --------- Co-authored-by: Manolis Papadakis Co-authored-by: Manolis Papadakis --- cmake/thirdparty/get_legion.cmake | 3 --- cmake/versions.json | 2 +- src/core/mapping/base_mapper.cc | 9 ++++----- src/core/mapping/base_mapper.h | 9 ++++----- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/cmake/thirdparty/get_legion.cmake b/cmake/thirdparty/get_legion.cmake index 8466372c7..101fd42e9 100644 --- a/cmake/thirdparty/get_legion.cmake +++ b/cmake/thirdparty/get_legion.cmake @@ -67,9 +67,6 @@ function(find_or_configure_legion) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/cpm_helpers.cmake) get_cpm_git_args(legion_cpm_git_args REPOSITORY ${git_repo} BRANCH ${git_branch}) - if(NOT DEFINED Legion_PYTHON_EXTRA_INSTALL_ARGS) - set(Legion_PYTHON_EXTRA_INSTALL_ARGS "--root / --prefix \"\${CMAKE_INSTALL_PREFIX}\"") - endif() # Support comma and semicolon delimited lists string(REPLACE "," " " Legion_PYTHON_EXTRA_INSTALL_ARGS "${Legion_PYTHON_EXTRA_INSTALL_ARGS}") diff --git a/cmake/versions.json b/cmake/versions.json index e3f9a1141..f74a50f1b 100644 --- a/cmake/versions.json +++ b/cmake/versions.json @@ -7,7 +7,7 @@ }, "Legion": { "git_url" : "https://gitlab.com/StanfordLegion/legion.git", - "git_tag" : "0cbee456b9ee80e494262f663bd4838666bdd0be" + "git_tag" : "d7803630bf9917e62e3674d598f194daa666785b" } } } diff --git a/src/core/mapping/base_mapper.cc b/src/core/mapping/base_mapper.cc index e6a2ceb1b..42d6f9281 100644 --- a/src/core/mapping/base_mapper.cc +++ b/src/core/mapping/base_mapper.cc @@ -447,11 +447,10 @@ void BaseMapper::map_task(const Legion::Mapping::MapperContext ctx, map_legate_stores(ctx, task, for_stores, task.target_proc, output_map); } -void BaseMapper::map_replicate_task(const Legion::Mapping::MapperContext ctx, - const Legion::Task& task, - const MapTaskInput& input, - const MapTaskOutput& def_output, - MapReplicateTaskOutput& output) +void BaseMapper::replicate_task(const Legion::Mapping::MapperContext ctx, + const Legion::Task& task, + const ReplicateTaskInput& input, + ReplicateTaskOutput& output) { LEGATE_ABORT; } diff --git a/src/core/mapping/base_mapper.h b/src/core/mapping/base_mapper.h index 2da1040e6..eae7f8e98 100644 --- a/src/core/mapping/base_mapper.h +++ b/src/core/mapping/base_mapper.h @@ -78,11 +78,10 @@ class BaseMapper : public Legion::Mapping::Mapper, public MachineQueryInterface const Legion::Task& task, const MapTaskInput& input, MapTaskOutput& output) override; - virtual void map_replicate_task(const Legion::Mapping::MapperContext ctx, - const Legion::Task& task, - const MapTaskInput& input, - const MapTaskOutput& default_output, - MapReplicateTaskOutput& output) override; + virtual void replicate_task(const Legion::Mapping::MapperContext ctx, + const Legion::Task& task, + const ReplicateTaskInput& input, + ReplicateTaskOutput& output) override; virtual void select_task_variant(const Legion::Mapping::MapperContext ctx, const Legion::Task& task, const SelectVariantInput& input, From d48ebec1cceda75e9e85025af9474df9284aea4a Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Wed, 7 Feb 2024 23:10:11 -0800 Subject: [PATCH 2/4] Try adding back --root to see if it still works under ToT legion --- cmake/thirdparty/get_legion.cmake | 3 +++ cmake/versions.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/thirdparty/get_legion.cmake b/cmake/thirdparty/get_legion.cmake index 101fd42e9..8466372c7 100644 --- a/cmake/thirdparty/get_legion.cmake +++ b/cmake/thirdparty/get_legion.cmake @@ -67,6 +67,9 @@ function(find_or_configure_legion) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/cpm_helpers.cmake) get_cpm_git_args(legion_cpm_git_args REPOSITORY ${git_repo} BRANCH ${git_branch}) + if(NOT DEFINED Legion_PYTHON_EXTRA_INSTALL_ARGS) + set(Legion_PYTHON_EXTRA_INSTALL_ARGS "--root / --prefix \"\${CMAKE_INSTALL_PREFIX}\"") + endif() # Support comma and semicolon delimited lists string(REPLACE "," " " Legion_PYTHON_EXTRA_INSTALL_ARGS "${Legion_PYTHON_EXTRA_INSTALL_ARGS}") diff --git a/cmake/versions.json b/cmake/versions.json index f74a50f1b..17de68421 100644 --- a/cmake/versions.json +++ b/cmake/versions.json @@ -7,7 +7,7 @@ }, "Legion": { "git_url" : "https://gitlab.com/StanfordLegion/legion.git", - "git_tag" : "d7803630bf9917e62e3674d598f194daa666785b" + "git_tag" : "22d28fe770a14d18c439c4192437a4472f7c4d9d" } } } From 10e00be0eba6161b77044b5056f96f9150aa1a2d Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Tue, 20 Feb 2024 14:28:29 -0800 Subject: [PATCH 3/4] Revert "Try adding back --root to see if it still works under ToT legion" This reverts commit d48ebec1cceda75e9e85025af9474df9284aea4a. --- cmake/thirdparty/get_legion.cmake | 3 --- cmake/versions.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cmake/thirdparty/get_legion.cmake b/cmake/thirdparty/get_legion.cmake index 8466372c7..101fd42e9 100644 --- a/cmake/thirdparty/get_legion.cmake +++ b/cmake/thirdparty/get_legion.cmake @@ -67,9 +67,6 @@ function(find_or_configure_legion) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/cpm_helpers.cmake) get_cpm_git_args(legion_cpm_git_args REPOSITORY ${git_repo} BRANCH ${git_branch}) - if(NOT DEFINED Legion_PYTHON_EXTRA_INSTALL_ARGS) - set(Legion_PYTHON_EXTRA_INSTALL_ARGS "--root / --prefix \"\${CMAKE_INSTALL_PREFIX}\"") - endif() # Support comma and semicolon delimited lists string(REPLACE "," " " Legion_PYTHON_EXTRA_INSTALL_ARGS "${Legion_PYTHON_EXTRA_INSTALL_ARGS}") diff --git a/cmake/versions.json b/cmake/versions.json index 17de68421..f74a50f1b 100644 --- a/cmake/versions.json +++ b/cmake/versions.json @@ -7,7 +7,7 @@ }, "Legion": { "git_url" : "https://gitlab.com/StanfordLegion/legion.git", - "git_tag" : "22d28fe770a14d18c439c4192437a4472f7c4d9d" + "git_tag" : "d7803630bf9917e62e3674d598f194daa666785b" } } } From 62e37fd033f183019cdcdbb0857333a890c50237 Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Tue, 20 Feb 2024 14:29:03 -0800 Subject: [PATCH 4/4] Bump Legion to get legion!1123 --- cmake/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/versions.json b/cmake/versions.json index f74a50f1b..c6e470aa4 100644 --- a/cmake/versions.json +++ b/cmake/versions.json @@ -7,7 +7,7 @@ }, "Legion": { "git_url" : "https://gitlab.com/StanfordLegion/legion.git", - "git_tag" : "d7803630bf9917e62e3674d598f194daa666785b" + "git_tag" : "ada1f4d6fcb651029798c826ff47a5455d38bc59" } } }