MCPcopy Create free account
hub / github.com/bnegreve/rasta / slice_batch

Function slice_batch

python/multi_gpu.py:9–17  ·  view source on GitHub ↗

Divide the input batch into [n_gpus] slices, and obtain slice no. [part]. i.e. if len(x)=10, then slice_batch(x, 2, 1) will return x[5:].

(x, n_gpus, part)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected