MCPcopy Create free account
hub / github.com/apple/axlearn / partition_spec

Method partition_spec

axlearn/common/input_base.py:286–297  ·  view source on GitHub ↗

Returns the input partition spec for `host_to_global_device_array` and for `jit`. Depending on the dispatch implementation, it may be possible to directly form the global logical batch from feed logical batches via `host_to_global_device_array`. In these cases, we can use an

(self)

Source from the content-addressed store, hash-verified

284
285 @property
286 def partition_spec(self) -> PartitionSpec:
287 """Returns the input partition spec for `host_to_global_device_array` and for `jit`.
288
289 Depending on the dispatch implementation, it may be possible to directly form the global
290 logical batch from feed logical batches via `host_to_global_device_array`. In these cases,
291 we can use an input partition spec that follows `cfg.partition_spec`.
292
293 In all other cases we default to `input_partition_spec()`.
294 """
295 if "input_dispatcher" in self.children:
296 return self.input_dispatcher.partition_spec
297 return input_partition_spec()

Calls 1

input_partition_specFunction · 0.90