Skip to content

sanitizer.race.access

sanitizer dialect

Observe a logical indexed view access for race detection. Unlike sanitizer.assert.access, this op does not assert that the access is individually valid and does not refine the continuing path. It records a memory event that target materialization can compare against prior unordered events in the selected race detector.

Operation contract

Property Value
Semantic phase
Traits UnknownEffects
Target contracts sanitizer.race

Signature

Kind Name Type Cardinality Description
Operand view view required Typed view being accessed.
Operand indices index variadic Dynamic logical element indices.
Attribute kind enum SanitizerRaceAccessKind required Logical access kind being observed.
Attribute atomic bool default False Whether the observed access is an atomic memory operation.
Attribute ordering enum AtomicOrdering optional Atomic memory ordering when atomic is true.
Attribute scope enum AtomicScope optional Atomic synchronization scope when atomic is true.
Attribute static_indices i64_array required Static logical element indices with INT64_MIN sentinels for dynamics.

Examples

sanitizer.race.access<read> %view[%lane] : view<64xi32>
sanitizer.race.access<read_write> %view[%lane] {atomic = true, ordering = acq_rel, scope = workgroup} : view<64xi32>