-
Notifications
You must be signed in to change notification settings - Fork 342
Open
Description
Help Us Prioritize Top-K Algorithm Variants for DeviceTopK (i.e., the single-problem, device-wide top-k algorithm)
We are planning the next set of improvements and implementations for DeviceTopK, and weโd like your input to help prioritize which variants we should focus on.
Please copy & paste the form below into a new comment and fill it out in order to describe which top-k features or variants are most important to you. Your responses will help us understand common use cases, preferred behaviors, and performance requirements, so we can prioritize the development of the most relevant versions.
๐๏ธ Top-K Algorithm Specification Form (click to expand)
# ๐งฎ Top-K Algorithm Specification Form
Please fill out the form below to describe which **Top-K algorithm parameters or variants** you need.
Use the checkboxes (`[x]`) to select the features or behaviors youโd like supported (multiple selections are fine). You can also add clarifying notes inline.
**Use case:**
```
If possible, briefly describe how or where you plan to use the top-K algorithm.
```
---
## โ๏ธ Basic Algorithmic Properties
**In-place vs Out-of-place** (you can select both if multiple modes are acceptable):
- [ ] In-place (produces top-k results within the input memory (lower memory overhead)
- [ ] Out-of-place writes results to a separate output iterator (typically higher memory use, potentially better parallel performance)
**Result ordering:**
- [ ] Ordered (top-k items are returned as a sorted sequence)
- [ ] Unordered (top-k items are returned in arbitrary order (i.e., a set of items))
**Stability:**
- [ ] Stable (retain the relative order from the input of selected items)
- [ ] Unstable (no order guarantee)
**Determinism:**
- [ ] Deterministic (bit-wise reproducible results)
- [ ] Non-deterministic (e.g., faster parallel variants)
---
## ๐ข Extended-K Behavior
**Extend `k` by all keys that compare equal?**
- [ ] Yes โ include all elements with equal keys beyond `k`
- [ ] No โ exactly `k` elements only
---
## ๐งฎ Algorithm Type
Choose the algorithmic approach:
- [ ] Radix-based
- [ ] Comparison-based
<details>
<summary>โถ๏ธ If Radix-based, please specify:</summary>
**Support for custom/arbitrary types?**
- [ ] Yes
- [ ] No
**Bit range to process:**
**Would you like to be able to specify the bit range that top-k will be looking at?**
- [ ] Yes
- [ ] No
</details>
---
## ๐พ Data Characteristics
**Common data types** (select all that apply):
- [ ] **Built-in / fundamental types**: standard integer and floating-point types (`uint8_t`, `int32_t`, `float`, `double`, etc.)
- [ ] **Extended floating-point types**: fp16, bfloat16, ...
- [ ] **Custom data types**
- [ ] **Specific subset only**: I primarily care about a few specific types: โ (please list them)
---
## ๐ Typical Problem Sizes
**Common number of input elements (`N`):**
- [ ] 1 โ 99 999
- [ ] 100 000 โ 999 999
- [ ] 1 000 000 โ 9 999 999
- [ ] 10 000 000 โ 99 999 999
- [ ] 100 000 000 โ 999 999 999
- [ ] โฅ 1 000 000 000
- [ ] Variable / depends on workload
- [ ] Custom: โ (please specify exact or range values)
**Common `k` values (number of top elements):**
- [ ] 1 โ 9
- [ ] 10 โ 99
- [ ] 100 โ 999
- [ ] 1 000 โ 9 999
- [ ] 10 000 โ 99 999
- [ ] 100 000 โ 999 999
- [ ] 1 000 000 โ 9 999 999
- [ ] 10 000 000 โ 99 999 999
- [ ] 100 000 000 โ 999 999 999
- [ ] โฅ 1 000 000 000
- [ ] Fraction of `N` (e.g., `k = N / 10`)
- [ ] Variable / depends on workload
- [ ] Custom: โ (please specify)If you're interested in other Top-K algorithm variants such as DeviceSegmentedTopK, BlockTopK, or WarpTopK, please refer to the corresponding issue below:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo