Link `CubDebug` with `CUB_DEBUG_LOG`
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
We should define `CUB_STDERR` if `CUB_DEBUG_LOG` specified. Otherwise, users are unable to see which kernel produces an error in CUB. Reproducer:
```cpp
#define CUB_DEBUG_LOG
// #define CUB_STDERR // should not be needed
#include
#include
int main() {
std::size_t temp_storage_bytes = 0;
void *d_temp_storage = &temp_storage_bytes;
int *keys = nullptr;
cub::DeviceReduce::Sum(d_temp_storage, temp_storage_bytes, keys, keys, 1 << 20);
}
```
Expected behavior:
```bash
CUDA error 1 [cub/cub/block/../iterator/../util_device.cuh, 98]: invalid argument
CUDA error 1 [cub/cub/device/dispatch/dispatch_reduce.cuh, 743]: invalid argument
CUDA error 1 [cub/cub/device/dispatch/dispatch_reduce.cuh, 952]: invalid argument
```
Current behavior:
```cpp
```
Contributor guide
Assessment
This issue has not been assessed yet.