Closed
[Bug-Report|缺陷反馈]: Examples中kennel参数类型不正确 #1
lidongshengAdd on  Dec 25, 2025Closed at  Jan 8
lidongsheng
lidongshengCollaborators
Dec 25, 2025 Create

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

Describe the current behavior / 问题描述 (Mandatory / 必填)

kernel的参数类型是pypto.Tensor, 不是torch.Tensor

examples/01_beginner/00_introduction/add_direct.py

@pypto.jit
def add_direct_kernel_npu(x: torch.Tensor, y: torch.Tensor, z: torch.Tensor) -> None:
    pypto.set_vec_tile_shapes(1, 4, 1, 64)
    z[:] = x + y

Environment / 环境信息 (Mandatory / 必填)

不涉及

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

不涉及, 代码静态检视

Describe the expected behavior / 预期结果 (Mandatory / 必填)

@pypto.jit
def add_direct_kernel_npu(x:  pypto.Tensor, y:  pypto.Tensor,  z:  pypto.Tensor) -> None:
    pypto.set_vec_tile_shapes(1, 4, 1, 64)
    z[:] = x + y

不涉及

Special notes for this issue/备注 (Optional / 选填)

不涉及

likedislike
lidongshenglidongshengCollaborators
Dec 26, 2025 Associated pull request
lidongsheng
lidongshengCollaborators
Dec 26, 2025 Comments:
lidongshenglidongshengCollaborators
Dec 26, 2025 changed custom state from 进行中 to 已完成
lidongshenglidongshengCollaborators
Dec 26, 2025 Close issue
杨旭杨旭Collaborators
Jan 7 Assign tsungl4 as responsible person
杨旭杨旭Collaborators
Jan 7 Added label: documentation
杨旭杨旭Collaborators
Jan 8 associated Kanban: PyPTO
杨旭杨旭Collaborators
Jan 8 Associated milestone: r0.1.1
杨旭杨旭Collaborators
Jan 8 changed custom category from 任务 to 缺陷
杨旭杨旭Collaborators
Jan 8 Associated pull request
杨旭杨旭Collaborators
Jan 8 changed custom state from 已完成 to 已确认
杨旭杨旭Collaborators
Jan 8 Reopen issue
杨旭杨旭Collaborators
Jan 8 changed custom state from 已确认 to 已完成
杨旭杨旭Collaborators
Jan 8 Close issue
CANN-robotCANN-robotCollaborators
Mar 20 Added label: resolved
raoliang_sacraoliang_sac
Jul 10 Associated pull request