We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bda4798 commit ab7dae5Copy full SHA for ab7dae5
src/forge/actors/generator.py
@@ -231,6 +231,14 @@ async def setup(self):
231
log_stats=None,
232
)
233
self._start_processing()
234
+ if self.prefetch_weights:
235
+ self._spawn_fetchers()
236
+
237
+ def _spawn_fetchers(self):
238
+ """Spawn weight fetchers that prefetch weights from torchstore to shared memory."""
239
+ # TODO: this assumes the generator is on the same host as the worker
240
+ # and only works for single host generators. Figure out how to support
241
+ # generators with workers spanned across multiple hosts.
242
fetcher_procs = this_host().spawn_procs(
243
per_host={"procs": self.n_fetcher_procs}
244
0 commit comments