Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Warning when using GridEvenShare with unsigned offsets #257

Closed
fkallen opened this issue Jan 9, 2021 · 1 comment · Fixed by #249
Closed

Warning when using GridEvenShare with unsigned offsets #257

fkallen opened this issue Jan 9, 2021 · 1 comment · Fixed by #249
Assignees
Milestone

Comments

@fkallen
Copy link
Contributor

fkallen commented Jan 9, 2021

The following warning occurs when DispatchRadixSort is instantiated with an unsigned offset type.

cuda-11.0/bin/../targets/x86_64-linux/include/cub/device/dispatch/../../grid/grid_even_share.cuh: In instantiation of ‘void cub::GridEvenShare<OffsetT>::DispatchInit(OffsetT, int, int) [with OffsetT = unsigned int]’:
required from here
cuda-11.0/bin/../targets/x86_64-linux/include/cub/device/dispatch/../../grid/grid_even_share.cuh:133:37: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
  133 |         this->grid_size             = CUB_MIN(total_tiles, max_grid_size);

Minimal reproduction code:

// nvcc -std=c++14 -Xcompiler "-Wall" file.cu
// Cuda compilation tools, release 11.0, V11.0.221
// Build cuda_11.0_bu.TC445_37.28845127_0

#include <cub/cub.cuh>

int main(){
    cub::GridEvenShare<unsigned int> a;
    a.DispatchInit(1,1,1);
}

Is it safe to ignore this warning?

@alliepiper
Copy link
Collaborator

Heh, I literally just fixed that on my local branch for #249 yesterday :) This shouldn't be an issue after the next release.

Is it safe to ignore this warning?

Yes.

@alliepiper alliepiper self-assigned this Jan 9, 2021
@alliepiper alliepiper added this to the 1.12.0 milestone Jan 9, 2021
@alliepiper alliepiper linked a pull request Jan 9, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants