Skip to content

Triton: tuple unpacking on assignment #80

Description

@Zaneham

Triton kernels use tuple-unpacking assignment forms like pid_m, pid_n = tl.program_id(0), tl.program_id(1) and the matmul-style a_ptrs += BLOCK_K * stride_ak with multi-component pointer arithmetic. The parser builds the Tuple AST node correctly on either side, but the lowering currently only handles Name targets in Assign and explicitly rejects Tuple targets through s_bind_assign_target. The fix is to walk the Tuple's children and bind each independently; if the RHS is also a Tuple we pair element-wise, otherwise we treat the RHS as iterable and project. For sitting-one purposes the element-wise pairing case is enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TritonTriton frontend (Python subset, tl.* intrinsics)enhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions