eth-cscs / DLA-Future

DLA-Future
https://eth-cscs.github.io/DLA-Future/master/
BSD 3-Clause "New" or "Revised" License
61 stars 13 forks source link

Enable more warnings as errors in CUDA CI configurations #1154

Open msimberg opened 3 months ago

msimberg commented 3 months ago

We currently use -Werror=all-warnings in CI. However, it seems like this doesn't actually enable all warnings. nvcc --help says:

--Werror <kind>,...                             (-Werror)
        Make warnings of the specified kinds into errors.  The following is the list
        of warning kinds accepted by this option:

        cross-execution-space-call
                Be more strict about unsupported cross execution space calls.
                The compiler will generate an error instead of a warning for a
                call from a __host__ __device__ to a __host__ function.
        reorder
                Generate errors when member initializers are reordered.
        deprecated-declarations
                Generate error on use of a deprecated entity.
        default-stream-launch
                Generate error when an explicit stream argument is not provided in
        the <<<...>>> kernel launch syntax.
        missing-launch-bounds
                Generate error when a __global__ function does not have an explicit
        __launch_bounds__ annotation.
        ext-lambda-captures-this
                Generate error when an extended lambda implicitly captures 'this'
        Allowed values for this option:  'all-warnings','cross-execution-space-call',
        'default-stream-launch','deprecated-declarations','ext-lambda-captures-this',
        'missing-launch-bounds','reorder'.

The non-all-warnings errors seem to enable warnings in addition to all-warnings. We should check if these additional warnings are useful to enable.