Update 'place' doc
This commit is contained in:
parent
eeeb1e3d7c
commit
9e5db04de3
|
@ -2137,8 +2137,10 @@ class Cell(Cell_):
|
|||
The rank is unique in processes with the same role.
|
||||
|
||||
Examples:
|
||||
>>> from mindspore import context
|
||||
>>> import mindspore.nn as nn
|
||||
>>> fc = nn.Dense()
|
||||
>>> context.set_context(mode=context.GRAPH_MODE)
|
||||
>>> fc = nn.Dense(2, 3)
|
||||
>>> fc.place('MS_WORKER', 0)
|
||||
"""
|
||||
all_ops = self._get_prims_recursively()
|
||||
|
|
|
@ -426,7 +426,9 @@ class Primitive(Primitive_):
|
|||
The rank_id is unique in processes with the same role.
|
||||
|
||||
Examples:
|
||||
>>> from mindspore import context
|
||||
>>> import mindspore.ops as ops
|
||||
>>> context.set_context(mode=context.GRAPH_MODE)
|
||||
>>> matmul = ops.MatMul()
|
||||
>>> matmul.place('MS_WORKER', 0)
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue