Skip to content

Implement aten::add.Tensor through InfiniOps #9

Description

@voltjia

Problem

The backend has allocation and copy support but no computational ATen operator.
The first operator should prove the PyTorch dispatcher to InfiniOps native path
without relying on InfiniOps' reverse ATen fallback generator.

Scope

  • Register aten::add.Tensor for PrivateUse1.
  • Call infini::ops::Add::Call with implementation index 0.
  • Support same-dtype tensors on the same infini device, alpha == 1, broadcast,
    and ordinary strided inputs.
  • Return early for empty tensors.
  • Fail clearly for type promotion, non-unit alpha, and unsupported backends.
  • Do not add scalar, out, or in-place overloads in this change.

Acceptance criteria

  • CPU and NVIDIA results match PyTorch for representative contiguous,
    broadcasted, and noncontiguous inputs.
  • Tests cover worker threads, current-device restoration, and nondefault streams.
  • The implementation does not recurse through at::add_out.

Depends on #6 and #8. Native Hygon and Cambricon Add coverage remains an
InfiniOps prerequisite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions