ITADN

example vectorAdd c is zero after adding

#11ClosedZiaeemehr 创建于 2022-09-24
Z
Ziaeemehrcommented
I am using ```sh nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Sun_Jul_28_19:07:16_PDT_2019 Cuda compilation tools, release 10.1, V10.1.243 ``` running the example return : ``` vectorAdd.cu:24: void verify_result(std::vector<int>&, std::vector<int>&, std::vector<int>&): Assertion `c[i] == a[i] + b[i]' failed. [1] 49753 abort (core dumped) ./prog ``` if I print few first elements of a, b, c after running kernel and copy data from device to host it returns all elements of `c` is zero.
关闭于 2022-09-30 2 条评论