cp.async.wait_group GPU Virtual ISA NVIDIA

cp.async.wait_group Data Movement and Conversion Instructions

cp.async.wait_group N;

cp.async.wait_group instruction will cause executing thread to wait till only N or fewer of the most recent cp.async-group s are pending and all the prior cp.async-group s committed by the executing threads are complete.

Encoding

PTX is a virtual instruction set. It has no single, stable native binary encoding - the compiler lowers this instruction to different native machine code depending on the selected NVIDIA target architecture (compute capability). This page intentionally shows no bit-diagram; see the target/version requirements below for what governs how this instruction compiles.
PTX ISA Version Introduced PTX ISA 7.0
Minimum Target sm_80

Syntax Forms

One mnemonic covers many type / state-space / scope / modifier combinations - each row below is an independently valid form.

Syntax Data Types State Space(s) Modifiers Min. Target Description
cp.async.wait_group N; sm_80 cp.async.wait_group instruction will cause executing thread to wait till only N or fewer of the most recent cp.async-group s are pending and all the prior cp. (see the official PTX ISA docs for the full description)

Operands

  • N
    Operand

At a Glance

Data Types -

Reference

NVIDIA PTX ISA

Description

cp.async.wait_group instruction will cause executing thread to wait till only N or fewer of the most recent cp.async-group s are pending and all the prior cp.async-group s committed by the executing threads are complete. For example, when N is 0, the executing thread waits on all the prior cp.async-group s to complete. Operand N is an integer constant. cp.async.wait_all is equivalent to: cp.async.commit_group; cp.async.wait_group 0; An empty cp.async-group is considered to be trivially complete. Writes performed by cp.async operations are made visible to the executing thread only after: The completion of cp.async.wait_all or The completion of cp.async.wait_group on the cp. (see the official PTX ISA docs for the full description)

Examples

// Example of .wait_all:
cp.async.ca.shared.global [shrd1], [gbl1], 4;
cp.async.cg.shared.global [shrd2], [gbl2], 16;
cp.async.wait_all;  // waits for all prior cp.async to complete

// Example of .wait_group :
// (truncated - see the official PTX ISA docs for the full example)

Reproduced from NVIDIA's official PTX ISA documentation for technical accuracy.

Sources