版主您好:
我想通过流来优化程序。
cudaMemcpyAsync(, , , ,stream0);
Host();
cudaMemcpyAsync(, , , ,stream0);
cudaMemcpyAsync(, , , ,stream1);
Host();
cudaMemcpyAsync(, , , ,stream1);
Host是一个类的成员函数,而内核函数被Host调用。我的问题是如何将stream参数传给内核函数。
版主您好:
我想通过流来优化程序。
cudaMemcpyAsync(, , , ,stream0);
Host();
cudaMemcpyAsync(, , , ,stream0);
cudaMemcpyAsync(, , , ,stream1);
Host();
cudaMemcpyAsync(, , , ,stream1);
Host是一个类的成员函数,而内核函数被Host调用。我的问题是如何将stream参数传给内核函数。
楼主您好,
kernel中不能使用host端的stream。
所以您的要求无法实现。
感谢节日来访。