mindspore.Tensor.is_shared
- Tensor.is_shared()
Check whether a Tensor is in the shared memory.
Note
For Ascend tensor,
Trueis always returned.- Returns
Bool. If the tensor is in the shared memory, return
True. Otherwise, returnFalse.
Examples
>>> import mindspore as ms >>> from mindspore import Tensor >>> x = ms.Tensor([1, 2, 3], ms.int16) >>> print(x.is_shared()) False