Skip to content

mlir: add enzyme.atomic_rmw op with ordering attribute#2950

Open
pengmai wants to merge 1 commit into
mainfrom
jmp/enzyme-atomic-rmw
Open

mlir: add enzyme.atomic_rmw op with ordering attribute#2950
pengmai wants to merge 1 commit into
mainfrom
jmp/enzyme-atomic-rmw

Conversation

@pengmai

@pengmai pengmai commented Jul 15, 2026

Copy link
Copy Markdown
Member

No description provided.

@pengmai
pengmai requested a review from wsmoses July 15, 2026 20:51
AtomicRMWKindAttr:$kind,
AtomicOrdering:$ordering,
AnyType:$value,
Arg<AnyMemRef, "the reference to rmw", [MemRead, MemWrite]>:$memref,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also preserve the alignment here (though I suppose we could just have alignment as a generic setAttr call)

enzyme::AtomicRMWOp::create(
builder, loadOp.getLoc(), gradient.getType(),
arith::AtomicRMWKind::addf, Ordering::monotonic, gradient,
memrefGradient, indices);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also need to do the same for the enzyme::AffineAtomicRMWOp too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants