Cuda自带的thrust没有 <thrust/universal_vector.h>文件
riverandroad opened this issue · 3 comments
08/06_thrust/01/main.cu文件里面include <thrust/universal_vector.h>
显示找不到 <thrust/universal_vector.h>
官方thrust库里面的"universal_allocator.h", "universal_ptr.h", "universal_vector.h"都没有在我电脑cuda的include的文件夹里面。是我安装cuda有问题吗?(2022年安装的cuda)还是更新了吗?#include <thrust/device_vector.h> #include <thrust/host_vector.h>
这些没有问题。
11.1版本的cuda,nvcc --version
后,显示是:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0
@archibate 暂时找到问题了,小彭老师,应该是因为cuda版本太旧了。看Thrust release的网站
Thrust 1.12.0 is the major release accompanying the NVIDIA HPC SDK 21.3 and the CUDA Toolkit 11.4.
It includes a new thrust::universal_vector, which holds data that is accessible from both host and device. This allows users to easily leverage CUDA's unified memory with Thrust.