Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many warnings with -Wconversion #779

Closed
nvibd opened this issue Jul 8, 2021 · 2 comments
Closed

Many warnings with -Wconversion #779

nvibd opened this issue Jul 8, 2021 · 2 comments
Assignees
Labels
good first issue Good for newcomers. thrust For all items related to Thrust.

Comments

@nvibd
Copy link

nvibd commented Jul 8, 2021

We're seeing a lot of warnings on Linux, host compiler GCC 9.3.0 with -Wconversion.

For a basic example, compile:

#include <thrust/device_vector.h>
int main() {
  thrust::device_vector<int> a;
  return 0;
}

With: nvcc main.cu -Xcompiler=-Wconversion.

This will result in around 1000 lines of output warnings.
Tested with the Thrust versions in CUDA 11.0, 11.3, and the latest commit on main on this repository (776bbc4d).

@alliepiper alliepiper added the good first issue Good for newcomers. label Jul 8, 2021
@alliepiper
Copy link
Collaborator

We should add this flag to Thrust and CUB's CI build system for all targets.

@matt-stack matt-stack self-assigned this Sep 28, 2021
matt-stack referenced this issue in matt-stack/thrust Oct 1, 2021
Referencing NVIDIA/thrust#1478 and also hand-in-hand with NVIDIA/cub branch bug/github/wconversion-thrust1478

This is to check the style is right and I am following best practices before adding -Wconversions to the gcc build and tackling those warnings. With this branch and the cub branch bug/github/wconversion-thrust1478, the simple reproducer should described in the orignal issue #1478 can build nvcc main.cu -Xcompiler=-Wconversion without warning.
matt-stack referenced this issue in matt-stack/cub Oct 1, 2021
This is in reference to NVIDIA/thrust#1478, two changes added to add explicit conversion
@jrhemstad jrhemstad added the thrust For all items related to Thrust. label Feb 22, 2023
@jarmak-nv jarmak-nv transferred this issue from NVIDIA/thrust Nov 8, 2023
@jrhemstad
Copy link
Collaborator

This should be resolved by #531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers. thrust For all items related to Thrust.
Projects
Archived in project
Development

No branches or pull requests

4 participants