torch_npu.npu_sign_bits_unpack(x, dtype, size) -> Tensor
将uint8类型1位Adam拆包为float。
>>>a = torch.tensor([159, 15], dtype=torch.uint8).npu() >>>b = torch_npu.npu_sign_bits_unpack(a, 0, 2) >>>b >>>tensor([[1., 1., 1., 1., 1., -1., -1., 1.], >>>[1., 1., 1., 1., -1., -1., -1., -1.]], device='npu:0') (binary form of 159 is ob00001111)