Skip to content

Commit 864cb55

Browse files
committed
finish api doc archive
1 parent 4225388 commit 864cb55

12 files changed

+124
-44
lines changed

doc/api/training/smd_model_parallel.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ Select a version to see the API documentation for version. To use the library, r
3535
:maxdepth: 1
3636

3737
smp_versions/latest.rst
38-
smp_versions/v1_3_0.rst
39-
smp_versions/v1_2_0.rst
40-
smp_versions/v1_1_0.rst
38+
smp_versions/archives.rst
4139

4240
It is recommended to use this documentation alongside `SageMaker Distributed Model Parallel
4341
<http://docs.aws.amazon.com/sagemaker/latest/dg/model-parallel.html>`__ in the Amazon SageMaker
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Version Archive
2+
===============
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
v1_5_0.rst
8+
v1_4_0.rst
9+
v1_3_0.rst
10+
v1_2_0.rst
11+
v1_1_0.rst

doc/api/training/smp_versions/latest.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Version 1.4.0 (Latest)
2+
Version 1.6.0 (Latest)
33
======================
44

55
To use the library, reference the Common API documentation alongside the framework specific API documentation.

doc/api/training/smp_versions/v1.4.0/add_smd_version.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

doc/api/training/smp_versions/v1.4.0/smd_model_parallel_common_api.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ The following SageMaker distribute model parallel APIs are common across all fra
2424
2525
2626
.. function:: smp.init( )
27+
:noindex:
2728

2829
Initialize the library. Must be called at the beginning of training script.
2930

3031
.. function:: @smp.step(non_split_inputs, input_split_axes, [*args, **kwargs])
32+
:noindex:
3133

3234
A decorator that must be placed over a function that represents a single
3335
forward and backward pass (for training use cases), or a single forward
@@ -162,6 +164,7 @@ The following SageMaker distribute model parallel APIs are common across all fra
162164

163165

164166
.. class:: StepOutput
167+
:noindex:
165168

166169

167170
A class that encapsulates all versions of a ``tf.Tensor``
@@ -191,27 +194,32 @@ The following SageMaker distribute model parallel APIs are common across all fra
191194
post-processing operations on tensors.
192195
193196
.. data:: StepOutput.outputs
197+
:noindex:
194198
195199
Returns a list of the underlying tensors, indexed by microbatch.
196200
197201
.. function:: StepOutput.reduce_mean( )
202+
:noindex:
198203
199204
Returns a ``tf.Tensor``, ``torch.Tensor`` that averages the constituent ``tf.Tensor`` s
200205
``torch.Tensor`` s. This is commonly used for averaging loss and gradients across microbatches.
201206

202207
.. function:: StepOutput.reduce_sum( )
208+
:noindex:
203209

204210
Returns a ``tf.Tensor`` /
205211
``torch.Tensor`` that sums the constituent
206212
``tf.Tensor``\ s/\ ``torch.Tensor``\ s.
207213

208214
.. function:: StepOutput.concat( )
215+
:noindex:
209216

210217
Returns a
211218
``tf.Tensor``/``torch.Tensor`` that concatenates tensors along the
212219
batch dimension using ``tf.concat`` / ``torch.cat``.
213220

214221
.. function:: StepOutput.stack( )
222+
:noindex:
215223

216224
Applies ``tf.stack`` / ``torch.stack``
217225
operation to the list of constituent ``tf.Tensor``\ s /
@@ -220,13 +228,15 @@ The following SageMaker distribute model parallel APIs are common across all fra
220228
**TensorFlow-only methods**
221229

222230
.. function:: StepOutput.merge( )
231+
:noindex:
223232

224233
Returns a ``tf.Tensor`` that
225234
concatenates the constituent ``tf.Tensor``\ s along the batch
226235
dimension. This is commonly used for merging the model predictions
227236
across microbatches.
228237

229238
.. function:: StepOutput.accumulate(method="variable", var=None)
239+
:noindex:
230240

231241
Functionally the same as ``StepOutput.reduce_mean()``. However, it is
232242
more memory-efficient, especially for large numbers of microbatches,
@@ -252,6 +262,7 @@ The following SageMaker distribute model parallel APIs are common across all fra
252262
ignored.
253263

254264
.. _mpi_basics:
265+
:noindex:
255266

256267
MPI Basics
257268
^^^^^^^^^^
@@ -275,6 +286,7 @@ The library exposes the following basic MPI primitives to its Python API:
275286
replicas of the same model partition.
276287

277288
.. _communication_api:
289+
:noindex:
278290

279291
Communication API
280292
^^^^^^^^^^^^^^^^^
@@ -288,6 +300,7 @@ should involve.
288300
**Helper structures**
289301

290302
.. data:: smp.CommGroup
303+
:noindex:
291304

292305
An ``enum`` that takes the values
293306
``CommGroup.WORLD``, ``CommGroup.MP_GROUP``, and ``CommGroup.DP_GROUP``.
@@ -306,6 +319,7 @@ should involve.
306319
themselves.
307320
308321
.. data:: smp.RankType
322+
:noindex:
309323
310324
An ``enum`` that takes the values
311325
``RankType.WORLD_RANK``, ``RankType.MP_RANK``, and ``RankType.DP_RANK``.
@@ -321,6 +335,7 @@ should involve.
321335
**Communication primitives:**
322336

323337
.. function:: smp.broadcast(obj, group)
338+
:noindex:
324339

325340
Sends the object to all processes in the
326341
group. The receiving process must call ``smp.recv_from`` to receive the
@@ -353,6 +368,7 @@ should involve.
353368
    smp.recv_from(0, rank_type=smp.RankType.WORLD_RANK)
354369
355370
.. function:: smp.send(obj, dest_rank, rank_type)
371+
:noindex:
356372
357373
Sends the object ``obj`` to
358374
``dest_rank``, which is of a type specified by ``rank_type``.
@@ -376,6 +392,7 @@ should involve.
376392
``recv_from`` call.
377393
378394
.. function:: smp.recv_from(src_rank, rank_type)
395+
:noindex:
379396
380397
Receive an object from a peer process. Can be used with a matching
381398
``smp.send`` or a ``smp.broadcast`` call.
@@ -401,6 +418,7 @@ should involve.
401418
``broadcast`` call, and the object is received.
402419

403420
.. function:: smp.allgather(obj, group)
421+
:noindex:
404422

405423
A collective call that gathers all the
406424
submitted objects across all ranks in the specified ``group``. Returns a
@@ -434,6 +452,7 @@ should involve.
434452
    out = smp.allgather(obj2, smp.CommGroup.MP_GROUP# returns [obj1, obj2]
435453
436454
.. function:: smp.barrier(group=smp.WORLD)
455+
:noindex:
437456

438457
A statement that hangs until all
439458
processes in the specified group reach the barrier statement, similar to
@@ -455,12 +474,14 @@ should involve.
455474
processes outside that ``mp_group``.
456475

457476
.. function:: smp.dp_barrier()
477+
:noindex:
458478

459479
Same as passing ``smp.DP_GROUP``\ to ``smp.barrier()``.
460480
Waits for the processes in the same \ ``dp_group`` as
461481
the current process to reach the same point in execution.
462482
463483
.. function:: smp.mp_barrier()
484+
:noindex:
464485
465486
Same as passing ``smp.MP_GROUP`` to
466487
``smp.barrier()``. Waits for the processes in the same ``mp_group`` as

0 commit comments

Comments
 (0)