(beta)NPU Tensor
Torch_npu提供NPU tensor相关的部分接口使用与Cuda类似。
表1 NPU Tensor API(beta)
PyTorch原生API名称
|
NPU形式名称
|
是否支持
|
参考链接
|
torch.cuda.DoubleTensor
|
torch_npu.npu.DoubleTensor
|
是
|
https://pytorch.org/docs/stable/tensors.html#data-types
|
torch.cuda.ShortTensor
|
torch_npu.npu.ShortTensor
|
是
|
torch.cuda.CharTensor
|
torch_npu.npu.CharTensor
|
是
|
torch.cuda.ByteTensor
|
torch_npu.npu.ByteTensor
|
是
|
torch.cuda.FloatTensor
|
torch_npu.npu.FloatTensor
|
是
|
torch.cuda.HalfTensor
|
torch_npu.npu.HalfTensor
|
是
|
torch.cuda.IntTensor
|
torch_npu.npu.IntTensor
|
是
|
torch.cuda.BoolTensor
|
torch_npu.npu.BoolTensor
|
是
|
torch.cuda.LongTensor
|
torch_npu.npu.LongTensor
|
是
|