Skip to content

Commit e9fef0d

Browse files
actor_mesh: cast_slices can go (#489)
Summary: Pull Request resolved: #489 this should have been in D78030552. better late than never Reviewed By: mariusae Differential Revision: D78113001 fbshipit-source-id: 1795c2e3a3754f397c4334f43e1c39a79223b887
1 parent 1613176 commit e9fef0d

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

hyperactor_mesh/src/actor_mesh.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -214,38 +214,6 @@ impl<'a, A: RemoteActor> RootActorMesh<'a, A> {
214214
self.proc_mesh.client().open_port()
215215
}
216216

217-
/// Until the selection logic is more powerful, we need a way to
218-
/// replicate the send patterns that the worker actor mesh actually does.
219-
#[allow(clippy::result_large_err)] // TODO: Consider reducing the size of `CastError`.
220-
pub fn cast_slices<M: RemoteMessage + Clone>(
221-
&self,
222-
sel: Vec<Slice>,
223-
message: M,
224-
) -> Result<(), CastError>
225-
where
226-
A: RemoteHandles<M> + RemoteHandles<IndexedErasedUnbound<M>>,
227-
{
228-
let _ = metrics::ACTOR_MESH_CAST_DURATION.start(hyperactor::kv_pairs!(
229-
"message_type" => M::typename(),
230-
"message_variant" => message.arm().unwrap_or_default(),
231-
));
232-
for ref slice in sel {
233-
for rank in slice.iter() {
234-
let mut headers = Attrs::new();
235-
set_cast_info_on_headers(
236-
&mut headers,
237-
rank,
238-
self.shape().clone(),
239-
self.proc_mesh.client().actor_id().clone(),
240-
);
241-
self.ranks[rank]
242-
.send_with_headers(self.proc_mesh.client(), headers, message.clone())
243-
.map_err(|err| CastError::MailboxSenderError(rank, err))?;
244-
}
245-
}
246-
Ok(())
247-
}
248-
249217
/// An event stream of proc events. Each ProcMesh can produce only one such
250218
/// stream, returning None after the first call.
251219
pub async fn next(&mut self) -> Option<ActorSupervisionEvent> {

0 commit comments

Comments
 (0)