vector.atomic.reduce.mask
← vector dialect
Masked atomic no-result scatter reduction/update. True mask lanes perform vector.atomic.reduce, while false mask lanes do not access memory.
Operation contract
| Property |
Value |
| Semantic phase |
— |
| Interfaces |
MemoryAccess |
| Memory effects |
readwrite view |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
value |
vector |
required |
Vector contribution for each lane. |
| Operand |
view |
view |
required |
Typed destination view. |
| Operand |
offsets |
vector |
required |
Per-lane signed element offsets from the logical origin. |
| Operand |
mask |
vector |
required |
i1 vector mask selecting active atomic lanes. |
| Operand |
indices |
index |
variadic |
Dynamic logical origin indices. |
| Attribute |
kind |
enum AtomicKind |
required |
— |
| Attribute |
ordering |
enum AtomicOrdering |
required |
Required atomic memory ordering. |
| Attribute |
scope |
enum AtomicScope |
required |
Required atomic synchronization scope. |
| Attribute |
cache_scope |
enum CacheScope |
optional |
Optional cache/coherency scope required by target lowering. |
| Attribute |
cache_temporal |
enum CacheTemporal |
optional |
Optional temporal cache policy required by target lowering. |
| Attribute |
static_indices |
i64_array |
required |
Static logical origin indices with INT64_MIN sentinels for dynamics. |
Verification constraints
HasI1Element(mask)
HasIndexOrNonI1IntegerElement(offsets)
SameElementType(value, view)
SameShape(offsets, mask, value)
Examples
vector.atomic.reduce.mask<addf> %v, %view[%row, %col][%offsets], %mask {ordering = relaxed, scope = device} : vector<4xf32>, view<[%m]x[%n]xf32, %layout>, vector<4xindex>, vector<4xi1>