-
Notifications
You must be signed in to change notification settings - Fork 757
warning: calling a __host__ function [...] from a __host__ __device__ function [...] #949
Comments
I have tried the same (dynamic parallelism) with thrust::sort and it doesn't work either.
My system: |
@nferenc13 What do you mean by
I think currently |
This should be fixed on master now; please reopen if that's not the case. I don't yet know what CUDA Toolkit version the fix will land in. |
Same issue with thrust::count() on Cuda V9.2.88. |
#include <vector>
#include <thrust/sort.h>
#include <thrust/binary_search.h>
#include <thrust/execution_policy.h>
#include <thrust/iterator/counting_iterator.h>
int main() {
std::vector< uint32_t > keys = {3,1,6,3,2,7,3,2,4,7,1,3,2};
std::vector< uint32_t > values = {1,7,8,3,2,3,1,3,2,1,4,2,4};
thrust::stable_sort_by_key(thrust::host, keys.begin(), keys.end(), values.begin());
std::vector< uint32_t > offsets(10, 0);
thrust::lower_bound(thrust::host,
keys.begin(),
keys.end(),
thrust::counting_iterator< uint32_t >(0),
thrust::counting_iterator< uint32_t >(10),
offsets.begin()
);
return 0;
}
these two calls to thrust are printing about 400 lines of warnings!
MSVC 19.24.28314.0 + CUDA 11.0.16 on Windows 10 |
Hello,
Simple use of
thrust::sort
causes compiling warnings and runtime error.I get the following warnings:
At runtime the program crash:
Bus error (core dumped)
This is a MWE:
I compile it with the following command:
nvcc -arch=sm_35 -rdc=true -g Sort.cu -lcudadevrt -o Sort
The running system is:
OS: Ubuntu Server 18.04 LTS
Kernel version: 4.15.0-43
CUDA version: 10.0
Thrust version: 1.9
Driver version: 410.79
GPU: Tesla K40c
The text was updated successfully, but these errors were encountered: