NVIDIA / NVIDIA/cccl

[FEA]: Consider compiling CCCL tests with enabled warnings for local memory and register spilling

Open
#2,253 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

### Is this a duplicate?

- [X] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)

### Area

General CCCL

### Is your feature request related to a problem? Please describe.

As a user and maintainer of CCCL, I want to be sure that there is not any unexpected local memory usage nor register spilling in any kernel or test as they are very bad for performance.

### Describe the solution you'd like

We should compile all CCCL tests by default with the `nvcc` options `-Xptxas-options=-warn-lmem-usage -Xptxas-options=-warn-spills -Xptxas-options=-Werror` to automatically fail compilation for any test that results in local memory or register spilling.

### Tasks
- [ ] Add flags to Thrust tests
- [ ] Add flags to CUB tests
- [ ] Add flags to libcudacxx tests

This issue can be closed when we've added these flags to the default build options for all CCCL tests and resolved any issues or exceptions.

### Describe alternatives you've considered

_No response_

### Additional context

There may be some tests where local memory or register spilling is expected/unavoidable and we can explicitly opt those tests out by manually opting those tests out of compiling with these flags.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.