MCPcopy Create free account
hub / github.com/tensorflow/lingvo / PartitionSequentialLayers

Function PartitionSequentialLayers

lingvo/core/gpipe.py:179–248  ·  view source on GitHub ↗

r"""Partition a layer composed of sequential layers. This routine strives to partition layers so that each partition costs roughly the same flops given the input shapes. Args: params: A layer param or a list of layer param. num_partitions: The desired number of partitions. *shape

(params, num_partitions, *shapes)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

_PartitionFunction · 0.90

Calls 4

FlattenSeqFunction · 0.85
FPropMetaMethod · 0.45
SetMethod · 0.45
ParamsMethod · 0.45

Tested by 1

_PartitionFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…