diff --git a/legate/cpp/legate_mapping.cpp b/legate/cpp/legate_mapping.cpp index e287d9cfae..66dea31cf9 100644 --- a/legate/cpp/legate_mapping.cpp +++ b/legate/cpp/legate_mapping.cpp @@ -20,7 +20,7 @@ namespace legate_kvikio { -class Mapper : public legate::mapping::LegateMapper { +class Mapper : public legate::mapping::Mapper { public: Mapper() {} @@ -76,18 +76,20 @@ Legion::Logger log_legate_kvikio(library_name); return registrar; } +// void registration_callback() +// { +// auto context = legate::Runtime::get_runtime()->create_library(library_name); +// Registry::get_registrar().register_all_tasks(context); +// } + void registration_callback() { legate::ResourceConfig config; - config.max_mappers = 1; - config.max_tasks = OP_NUM_TASK_IDS; - - legate::LibraryContext context(library_name, config); + config.max_tasks = OP_NUM_TASK_IDS; + auto context = legate::Runtime::get_runtime()->create_library( + library_name, config, std::make_unique()); Registry::get_registrar().register_all_tasks(context); - - // Now we can register our mapper with the runtime - context.register_mapper(std::make_unique(), 0); } } // namespace legate_kvikio diff --git a/legate/cpp/legate_mapping.hpp b/legate/cpp/legate_mapping.hpp index ef0d921337..2158cb0955 100644 --- a/legate/cpp/legate_mapping.hpp +++ b/legate/cpp/legate_mapping.hpp @@ -21,12 +21,6 @@ namespace legate_kvikio { struct Registry { - public: - template - static void record_variant(Args&&... args) - { - get_registrar().record_variant(std::forward(args)...); - } static legate::TaskRegistrar& get_registrar(); }; diff --git a/legate/legate_kvikio/library_description.py b/legate/legate_kvikio/library_description.py index 5f902e2431..18dc01cb11 100644 --- a/legate/legate_kvikio/library_description.py +++ b/legate/legate_kvikio/library_description.py @@ -7,7 +7,7 @@ from legate_kvikio.install_info import header, libpath -from legate.core import Library, ResourceConfig, get_legate_runtime +from legate.core import Library, get_legate_runtime class LibraryDescription(Library): @@ -30,13 +30,6 @@ def get_c_header(self) -> str: def get_registration_callback(self) -> str: return "legate_kvikio_perform_registration" - def get_resource_configuration(self) -> ResourceConfig: - assert self.shared_object is not None - config = ResourceConfig() - config.max_mappers = 1 - config.max_tasks = self.cffi.OP_NUM_TASK_IDS - return config - def initialize(self, shared_object: Any) -> None: self.shared_object = shared_object