Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions hyperactor_mesh/benches/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use criterion::Criterion;
use criterion::Throughput;
use criterion::criterion_group;
use criterion::criterion_main;
use hyperactor::Proc;
use hyperactor::channel::ChannelTransport;
use hyperactor_mesh::ProcMesh;
use hyperactor_mesh::actor_mesh::ActorMesh;
Expand Down Expand Up @@ -51,9 +52,10 @@ fn bench_actor_scaling(c: &mut Criterion) {
.await
.unwrap();

let (bootstrap_instance, _) = Proc::local().instance("bench").unwrap();
let mut proc_mesh = ProcMesh::allocate(alloc).await.unwrap();
let actor_mesh: RootActorMesh<BenchActor> = proc_mesh
.spawn("bench", &(Duration::from_millis(0)))
.spawn(&bootstrap_instance, "bench", &(Duration::from_millis(0)))
.await
.unwrap();
let client = proc_mesh.client();
Expand Down Expand Up @@ -149,9 +151,10 @@ fn bench_actor_mesh_message_sizes(c: &mut Criterion) {
.await
.unwrap();

let (bootstrap_instance, _) = Proc::local().instance("bench").unwrap();
let mut proc_mesh = ProcMesh::allocate(alloc).await.unwrap();
let actor_mesh: RootActorMesh<BenchActor> = proc_mesh
.spawn("bench", &(Duration::from_millis(0)))
.spawn(&bootstrap_instance, "bench", &(Duration::from_millis(0)))
.await
.unwrap();

Expand Down
5 changes: 4 additions & 1 deletion hyperactor_mesh/examples/dining_philosophers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use hyperactor::Handler;
use hyperactor::Instance;
use hyperactor::Named;
use hyperactor::PortRef;
use hyperactor::Proc;
use hyperactor::Unbind;
use hyperactor::channel::ChannelTransport;
use hyperactor_mesh::ProcMesh;
Expand Down Expand Up @@ -237,10 +238,12 @@ async fn main() -> Result<ExitCode> {
})
.await?;

let (instance, _) = Proc::local().instance("client").unwrap();

let proc_mesh = ProcMesh::allocate(alloc).await?;
let params = PhilosopherActorParams { size: group_size };
let actor_mesh = proc_mesh
.spawn::<PhilosopherActor>("philosopher", &params)
.spawn::<PhilosopherActor>(&instance, "philosopher", &params)
.await?;
let (dining_message_handle, mut dining_message_rx) = proc_mesh.client().open_port();
actor_mesh
Expand Down
7 changes: 6 additions & 1 deletion hyperactor_mesh/examples/sieve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use hyperactor::Context;
use hyperactor::Handler;
use hyperactor::Named;
use hyperactor::PortRef;
use hyperactor::Proc;
use hyperactor::channel::ChannelTransport;
use hyperactor_mesh::Mesh;
use hyperactor_mesh::ProcMesh;
Expand Down Expand Up @@ -116,8 +117,12 @@ async fn main() -> Result<ExitCode> {

let mesh = ProcMesh::allocate(alloc).await?;

let (instance, _) = Proc::local().instance("client").unwrap();

let sieve_params = SieveParams { prime: 2 };
let sieve_mesh = mesh.spawn::<SieveActor>("sieve", &sieve_params).await?;
let sieve_mesh = mesh
.spawn::<SieveActor>(&instance, "sieve", &sieve_params)
.await?;
let sieve_head = sieve_mesh.get(0).unwrap();

let mut primes = vec![2];
Expand Down
Loading