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

Fix cub::DeviceHistogram::MultiHistogramEven() 1-Dimensional overload, when OffsetT is not an int. #287

Merged
merged 2 commits into from
May 20, 2021

Conversation

nv-dlasalle
Copy link
Contributor

When using gcc=7.5.0 and OffsetT=int64_t, the following template errors occur:

/usr/local/cuda/include/cub/device/device_histogram.cuh(144): error: no instance of overloaded function "dgl::cub::DeviceHistogram::MultiHistogramEven" matches the argument list
            argument types are: (void *, size_t, int32_t *, unsigned long long *[1], int [1], int32_t [1], int32_t [1], int64_t, int, unsigned long, cudaStream_t, __nv_bool)
          detected during:
            instantiation of "cudaError_t dgl::cub::DeviceHistogram::HistogramEven(void *, size_t &, SampleIteratorT, CounterT *, int, LevelT, LevelT, OffsetT, cudaStream_t, __nv_bool) [with SampleIteratorT=int32_t *, CounterT=unsigned long long, LevelT=int32_t, OffsetT=int64_t]"

This resolves this, by casting the 0 to an OffsetT, so as to ensure num_rows and num_row_samples are of the same type.

@alliepiper
Copy link
Collaborator

alliepiper commented Apr 22, 2021

Thanks for the patch! This LGTM.

Would you mind updating this PR to fix the same issue on line 153 of this file, too?

@alliepiper alliepiper added this to the 1.13.0 milestone Apr 22, 2021
@alliepiper alliepiper assigned alliepiper and unassigned nv-dlasalle Apr 22, 2021
@nv-dlasalle
Copy link
Contributor Author

@allisonvacanti Updated line 153 as well--which is actually the one where I encountered the issue. Thanks for catching that!

@alliepiper
Copy link
Collaborator

That was fast -- thanks! I'll get this in for the next release.

alliepiper added a commit to alliepiper/thrust that referenced this pull request May 10, 2021
@alliepiper
Copy link
Collaborator

DVS CL: 29946795
gpuCI: NVIDIA/thrust#1428

@alliepiper alliepiper added testing: internal ci in progress Currently testing on internal NVIDIA CI (DVS). testing: gpuCI in progress Started gpuCI testing. labels May 10, 2021
@alliepiper alliepiper added testing: internal ci passed Passed internal NVIDIA CI (DVS). testing: gpuCI passed Passed gpuCI testing. and removed testing: internal ci in progress Currently testing on internal NVIDIA CI (DVS). testing: gpuCI in progress Started gpuCI testing. labels May 12, 2021
@alliepiper
Copy link
Collaborator

Tests look good -- I'll merge this soon.

@alliepiper alliepiper merged commit e50fee7 into NVIDIA:main May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing: gpuCI passed Passed gpuCI testing. testing: internal ci passed Passed internal NVIDIA CI (DVS).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants