Skip to content

Triton: tl.atomic_add and the atomic family #83

Description

@Zaneham

Triton exposes a family of atomic operations (tl.atomic_add, tl.atomic_xchg, tl.atomic_cas, tl.atomic_min, tl.atomic_max, tl.atomic_and, tl.atomic_or, tl.atomic_xor) used in reductions, histograms, and sparse update patterns. None of them are in the sema intrinsic table yet, and the lowerer has no handler. The BIR side already covers atomics through BIR_ATOMIC_ADD and friends (subop carries the memory ordering), so this is mostly: add entries to the tl.* intrinsic table in src/triton/sema.c, and add the corresponding switch arms in l_intrinsic_call in src/triton/lower.c that route to the right BIR_ATOMIC_* opcode. Honour the mask= keyword the same way once mask honouring lands (issue tracked separately).

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