From ac655f74ca5937128e0e8335b0d057598e5761c1 Mon Sep 17 00:00:00 2001 From: suo Date: Tue, 8 Jul 2025 11:23:46 -0700 Subject: [PATCH 1/2] [monarch/ext] fold monarch_meta_extension into actor_extension Right now we have 3 extensions: - actor_extension - monarch_extension (will be turned into tensor_engine_extension) - monarch_meta_extension (internal-only). This diff folds `monarch_meta_extension` into `actor_extension` to reduce the number of independent shared objects, using condition compilation to make the OSS build work. Differential Revision: [D77941251](https://our.internmc.facebook.com/intern/diff/D77941251/) [ghstack-poisoned] --- actor_extension/src/lib.rs | 6 ++++++ monarch_meta_extension/Cargo.toml | 24 ------------------------ 2 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 monarch_meta_extension/Cargo.toml diff --git a/actor_extension/src/lib.rs b/actor_extension/src/lib.rs index 13ebfbdf..f6b47beb 100644 --- a/actor_extension/src/lib.rs +++ b/actor_extension/src/lib.rs @@ -16,6 +16,9 @@ mod blocking; mod code_sync; mod panic; +#[cfg(fbcode_build)] +mod meta; + fn get_or_add_new_module<'py>( module: &Bound<'py, PyModule>, module_name: &str, @@ -113,5 +116,8 @@ pub fn mod_init(module: &Bound<'_, PyModule>) -> PyResult<()> { crate::panic::register_python_bindings(&get_or_add_new_module(module, "panic")?)?; crate::blocking::register_python_bindings(&get_or_add_new_module(module, "blocking")?)?; + + #[cfg(fbcode_build)] + crate::meta::register_python_bindings(&get_or_add_new_module(module, "meta")?)?; Ok(()) } diff --git a/monarch_meta_extension/Cargo.toml b/monarch_meta_extension/Cargo.toml deleted file mode 100644 index 6dc4c575..00000000 --- a/monarch_meta_extension/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -# @generated by autocargo from //monarch/monarch_meta_extension:monarch_meta_extension-lib - -[package] -name = "monarch_meta_extension" -version = "0.0.0" -authors = ["Meta"] -edition = "2021" -license = "BSD-3-Clause" - -[lib] -name = "_lib_meta" -test = false -doctest = false -crate-type = ["cdylib"] - -[dependencies] -anyhow = "1.0.98" -fbinit = { version = "0.2.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" } -hyperactor = { version = "0.0.0", path = "../hyperactor" } -hyperactor_extension = { version = "0.0.0", path = "../hyperactor_extension" } -hyperactor_mesh = { version = "0.0.0", path = "../hyperactor_mesh" } -pyo3 = { version = "0.24", features = ["anyhow", "multiple-pymethods"] } -pyo3-async-runtimes = { version = "0.24", features = ["attributes", "tokio-runtime"] } -tokio = { version = "1.45.0", features = ["full", "test-util", "tracing"] } From 1ed7e76c4f0ec73022a3c76a43a236c70bf45ebe Mon Sep 17 00:00:00 2001 From: suo Date: Tue, 8 Jul 2025 13:31:47 -0700 Subject: [PATCH 2/2] Update on "[monarch/ext] fold monarch_meta_extension into actor_extension" Right now we have 3 extensions: - actor_extension - monarch_extension (will be turned into tensor_engine_extension) - monarch_meta_extension (internal-only). This diff folds `monarch_meta_extension` into `actor_extension` to reduce the number of independent shared objects, using condition compilation to make the OSS build work. Differential Revision: [D77941251](https://our.internmc.facebook.com/intern/diff/D77941251/) [ghstack-poisoned]