Skip to content

[Requirement] 支持torch.uint64在npu上的相关计算 #158

Description

@daifucong233

除了创建 Tensor 啥也干不了

>>> A = torch.randint(0, 100, (1,), dtype=torch.uint64, device="cpu")
>>> A = torch.randint(0, 100, (1,), dtype=torch.uint64, device="npu")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: self scalar_type:UInt64is not surpported.
[ERROR] 2026-08-03-15:37:30 (PID:235311, Device:0, RankID:0) ERR01002 OPS invalid type
>>> A = torch.empty((1,), dtype=torch.uint64, device="npu")
>>> A = A + 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: add_out_npu_nocheck:third_party/op-plugin/op_plugin/ops/opapi/AddKernelNpuOpApi.cpp:52 NPU function error: call aclnnAdds failed, error code is 161002
[ERROR] 2026-08-03-15:41:28 (PID:235311, Device:0, RankID:0) ERR00100 PTA call acl api failed.
[PID: 235311] 2026-08-03-15:41:28.117.010 AclNN_Parameter_Error(EZ1001): Tensor self not implemented for DT_UINT64, should be in dtype support list [DT_FLOAT,DT_INT32,DT_INT64,DT_FLOAT16,DT_INT16,DT_INT8,DT_UINT8,DT_DOUBLE,DT_BOOL,DT_BFLOAT16,DT_COMPLEX64,DT_COMPLEX128,].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions