我使用推力与库达5.5进行整数向量排序。排序100*1024*1024 int应该分配400 my内存,但是nvidia-smi总是显示“内存-使用105 my/1023 my”。
排序150*1024*1024会导致分配错误:
terminate called after throwing an instance of 'thrust::system::detail::bad_alloc'
what(): std::bad_alloc: out of memory
Aborted (core dumped)
在数组分配之前,我使用cudaMemGetInfo检查内存,它