PTX ISA v9.4

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

  • a is a destination address, and must be either a register, or of the form register + immOff, as described in Addresses as Operands.
  • b is a source value, of the type indicated by qualifier .type.

Qualifiers

  • The mandatory .sem modifier specifies the memory ordering semantics as described in the Memory Consistency Model.
  • The mandatory .scope modifier specifies the set of threads with which this instruction can directly synchronize. The reduce operation is a strong memory operation with .release semantics at the scope specified by .scope.
  • .ss specifies the state space of the destination operand a. If .ss is specified, it must be .global. If .ss is not specified, generic addressing is used for operand a. If the generic address specified does not fall within the address window of .global state space, the behavior is undefined.
  • .type specifies the type of the source operand b.

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;
esc
Type to search across all documentation