Eliminate max_dim_x checks
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 487
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 296
Description
Currently, scan is organized as follows:
```cpp
int max_dim_x;
if (CubDebug(error = cudaDeviceGetAttribute(&max_dim_x, cudaDevAttrMaxGridDimX, device_ordinal))) break;
// Run grids in epochs (in case number of tiles exceeds max x-dimension
int scan_grid_size = CUB_MIN(num_tiles, max_dim_x);
for (int start_tile = 0; start_tile < num_tiles; start_tile += scan_grid_size) {
// scan a tile
```
Starting with SM35 (minimal supported version for CUB), the `max_dim_x` always matches the int max, so this loop is of no use. Moreover, scan by key uses the very same approach, but ignores `start_tile` variable in tile index computation.
If there's nothing I'm missing, I suggest we remove `max_dim_x` checks and simplify the code.
Contributor guide
Assessment
This issue has not been assessed yet.