Predicated Select Comparison
Select between two operands based on a predicate/condition, without branching.
Vendor-Neutral Definition
d = predicate ? a : b, computed unconditionally with no control-flow divergence.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler
translations.
equivalent with restrictions
Both select between two operands based on a condition, entirely branch-free.
| Property | NVIDIA PTX | AMDGPU |
|---|---|---|
| Instruction | selp | v_cndmask_b32 |
| ISA Layer | Virtual | Native |
| Data Types | b16, b32, b64, f32, f64, s16, s32, s64, u16, u32, u64 | b32 |
| Version / Target Introduced | PTX ISA 1.0 | gfx1100 |
Important Differences
- PTX's selp takes an explicit predicate-register operand; AMDGPU's v_cndmask_b32 reads its per-lane condition from VCC (or, in its VOP3 form, an arbitrary SGPR pair) rather than a general-purpose predicate register operand slot.
Source Evidence
- Parallel Thread Execution ISA ↗ - NVIDIA Corporation
- "AMD Instinct MI300" Instruction Set Architecture: Reference Guide ↗ - Advanced Micro Devices, Inc.
Verification method: documentation