Blog

1 week ago

DTensor 101: Mesh, Layout, and SPMD in TensorFlow

DTensor adds a global, sharded-tensor model to TensorFlow. You define a device Mesh and a per-axis Layout; DTensor expands your code via SPMD, inserting collectives so ops like tf.matmul run across CPUs/GPUs/TPUs—or even multi-client setups—with the same Python. You can replicate or shard tensors, pack/unpack components, request sharded outputs with dtensor.call_with_layout, and use dtensor.DVariable (fixed layout) instead of tf.Variable. The notebook walks through creating meshes, applying layouts, matmul sharding strategies, generating DTensor outputs, and variable semantics—setting you up for DTensor-based distributed training.

Source: HackerNoon →


Share

BTCBTC
$115,710.00
0.94%
ETHETH
$4,476.45
1.27%
XRPXRP
$3.00
1.08%
USDTUSDT
$1.00
0.01%
BNBBNB
$996.15
0.26%
SOLSOL
$239.23
2.4%
USDCUSDC
$1.000
0%
DOGEDOGE
$0.266
3.28%
STETHSTETH
$4,470.60
1.33%
ADAADA
$0.899
1.26%
TRXTRX
$0.347
0.11%
WSTETHWSTETH
$5,429.82
1.29%
LINKLINK
$23.46
4.15%
WBETHWBETH
$4,827.04
1.33%
HYPEHYPE
$56.36
0.38%
WBTCWBTC
$115,641.00
0.95%
AVAXAVAX
$33.86
1.03%
USDEUSDE
$1.00
0.04%
SUISUI
$3.69
3.51%
FIGR_HELOCFIGR_HELOC
$0.997
3.71%