Skip to content

Commit d702385

Browse files
zdevitofacebook-github-bot
authored andcommitted
Unify Tensor engine's future with ActorFuture (#302)
Summary: Pull Request resolved: #302 This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports. The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions. This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports. The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own. The controller actor will directly send result values to Port given to it when it is ready. `fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future. To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port. ghstack-source-id: 294262335 Reviewed By: mariusae Differential Revision: D76918699 fbshipit-source-id: e717e8b7f5b69a293f0556347a53bec6a75fd4f9
1 parent 387a249 commit d702385

File tree

19 files changed

+1024
-626
lines changed

19 files changed

+1024
-626
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ members = [
1414
"nccl-sys",
1515
"torch-sys",
1616
]
17+
18+
[profile.release]
19+
incremental = true

monarch_extension/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ crate-type = ["cdylib"]
1515

1616
[dependencies]
1717
anyhow = "1.0.98"
18+
async-trait = "0.1.86"
1819
bincode = "1.3.3"
1920
clap = { version = "4.5.38", features = ["derive", "env", "string", "unicode", "wrap_help"] }
2021
controller = { version = "0.0.0", path = "../controller", optional = true }

0 commit comments

Comments
 (0)