Kernel/Thread Exit Control Flow

Terminate execution of the current thread or the whole kernel invocation.

Vendor-Neutral Definition

Marks the executing thread (or, on some platforms, the whole wave/program) as complete; no further instructions from it are issued.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler translations.
equivalent with restrictions Both terminate execution, though at different granularities.
Property NVIDIA PTX AMDGPU
Instruction exit s_endpgm
ISA Layer Virtual Native
Data Types - -
Version / Target Introduced PTX ISA 1.0 gfx1100

Important Differences

  • PTX's exit terminates only the calling thread (other threads in the same CTA continue); AMDGPU's s_endpgm terminates the entire wavefront's program, not a single lane - there is no AMDGPU instruction for exiting one lane while its wavefront continues, since AMDGPU's EXEC mask model handles per-lane divergence differently.

Source Evidence

Verification method: documentation