torch_npu.npu_dtype_cast(input, dtype) -> Tensor
执行张量数据类型(dtype)转换。
>>> torch_npu.npu_dtype_cast(torch.tensor([0, 0.5, -1.]).npu(), dtype=torch.int) tensor([ 0, 0, -1], device='npu:0', dtype=torch.int32)