9.7.10.12. Data Movement and Conversion Instructions: st.async
st.async
Asynchronous store operation.
Syntax
ptx
st.async{.weak}{.ss}.completion_mechanism{.vec}.type [a], b, [mbar];
.ss = { .shared::cluster };
.type = { .b32, .b64, .b128,
.u32, .u64,
.s32, .s64,
.f32, .f64 };
.vec = { .v2, .v4 };
.completion_mechanism = { .mbarrier::complete_tx::bytes };
st.async{.mmio}.sem.scope{.ss}.type [a], b;
.sem = { .release };
.scope = { .gpu, .sys };
.ss = { .global };
.type = { .b8, .b16, .b32, .b64,
.u8, .u16, .u32, .u64,
.s8, .s16, .s32, .s64,
.f32, .f64 };Description
st.async is a non-blocking instruction which initiates an asynchronous store operation that stores the value specified by source operand b to the destination memory location specified by operand a.
st.async is performed in the generic proxy.
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.mbaris an mbarrier object address.
Qualifiers
.mmioindicates whether this is an mmio Operation..semspecifies the memory ordering semantics as described in the Memory Consistency Model.- If
.semis not specified, it defaults to.weak. .scopespecifies the set of threads with which this instruction can directly synchronize..ssspecifies the state space of the destination operandaand the mbarrier operandmbar.- If
.ssis not specified, Generic Addressing is used. .completion_mechanismspecifies the mechanism for observing the completion of the asynchronous operation.- When
.completion_mechanismis.mbarrier::complete_tx::bytes: upon completion of the asynchronous operation, a complete-tx operation will be performed on the mbarrier object specified by the operandmbar, withcompleteCountargument equal to the amount of data stored in bytes. This instruction accesses its mbarrier operand using generic-proxy. .typespecifies the type of the source operandb.
Conditions
When .sem is .weak:
- This is a weak store to shared memory, which signals its completion through an mbarrier object.
- The store operation is treated as a weak memory operation.
- Requires:
- The shared memory addresses of destination operand
aand the mbarrier objectmbarbelong to the same CTA within the same cluster as the executing thread. - The number of CTAs within the cluster is strictly greater than one;
%cluster_nctarank > 1is true. - Otherwise, the behavior is undefined.
.mmiomust not be specified.- If
.ssis specified, it must be.shared::cluster. - If
.ssis not specified, generic addressing is used for operandsaandmbar. If the generic addresses specified do not fall within the address window of.shared::clusterstate space, the behavior is undefined. .completion_mechanismmust be specified and must be.mbarrier::complete_tx::bytes.
When .sem is .release:
- This is a release store to global memory.
- The store operation is a strong memory operation with
.releasesemantics at the scope specified by.scope. - If
.mmiois specified,.scopemust be.sys. - 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. - For
.vecqualifier: .v2is supported with.b32,.b64,.s32,.s64,.u32,.u64,.f32and.f64types..v4qualifier is supported with.b32,.s32,.u32and.f32types.
PTX ISA Notes
Introduced in PTX ISA version 8.1.
Support for .mmio qualifier, .release semantics, .global state space, and .scope qualifier introduced in PTX ISA version 8.7.
Support for .b128 type introduced in PTX ISA version 9.2.
Target ISA Notes
Requires sm_90 or higher.
.mmio qualifier, .release semantics, .global state space, and .scope qualifier require sm_100 or higher.
Examples
ptx
st.async.shared::cluster.mbarrier::complete_tx::bytes.u32 [addr], b, [mbar_addr];
st.async.sys.release.global.u32 [addr], b;
st.async.mbarrier::complete_tx::bytes.b128 [addr], b, [mbar_addr];
st.async.shared::cluster.mbarrier::complete_tx::bytes.b128 [addr], b, [mbar_addr];