9.7.15.8. Parallel Synchronization and Communication Instructions: multimem.red.async
multimem.red.async
Perform asynchronous reduction with release ordering on the multimem address.
Syntax
ptx
multimem.red.async.sem.scope{.ss}.op.type [a], b;
.sem = { .release };
.scope = { .gpu, .sys };
.ss = { .global };
.op = { .add };
.type = { .u32, .s32, .u64 };Description
multimem.red.async is a non-blocking instruction which initiates an asynchronous reduction operation specified by .op, with operand b and the value at memory locations residing on each GPU's memory referred to by the destination multimem address operand a.
Address operand a must be a multimem address. Otherwise, the behavior is undefined.
Operands
ais a destination address, and must be either a register, or of the formregister + immOff, as described in Addresses as Operands.bis a source value, of the type indicated by qualifier.type.
Qualifiers
- The mandatory
.semmodifier specifies the memory ordering semantics as described in the Memory Consistency Model. - The mandatory
.scopemodifier specifies the set of threads with which this instruction can directly synchronize. The reduce operation is a strong memory operation with.releasesemantics at the scope specified by.scope. .ssspecifies the state space of the destination operanda. If.ssis specified, it must be.global. If.ssis not specified, generic addressing is used for operanda. If the generic address specified does not fall within the address window of.globalstate space, the behavior is undefined..typespecifies the type of the source operandb.
PTX ISA Notes
Introduced in PTX ISA version 9.3.
Target ISA Notes
Requires architecture sm_100 or higher.
Examples
ptx
// Asynchronous add reduction, GPU scope, explicit .global, 32-bit unsigned.
multimem.red.async.release.gpu.global.add.u32 [mm_addr], src_u32;
// System scope, generic addressing.
multimem.red.async.release.sys.add.s32 [mm_addr], src_s32;
// 64-bit unsigned add reduction.
multimem.red.async.release.gpu.global.add.u64 [mm_addr], src_u64;