torch_npu.npu_clear_float_status

API接口

torch_npu.npu_clear_float_status(self) -> Tensor

功能描述

在每个核中设置地址0x40000的值为0。

参数说明

self (Tensor) - 数据类型为float32的张量。

示例

>>> x = torch.rand(2).npu()
>>> torch_npu.npu_clear_float_status(x)
tensor([0., 0., 0., 0., 0., 0., 0., 0.], device='npu:0')