【发布时间】:2017-08-01 07:18:15
【问题描述】:
我正在使用 cufft 库。我正在使用 cufftPlan2d 函数来创建我需要的计划。以下是我的代码:
cudaEvent_t start1,stop1;
cudaEventCreate(&start1);
cudaEventCreate(&stop1);
cudaEventRecord(start1, 0);
cufftHandle plan1;
cufftPlan2d(&plan1,HEIGHT2,WIDTH2,CUFFT_C2C);
cudaEventRecord(stop1,0);
cudaEventSynchronize(stop1);
float etime;
cudaEventElapsedTime(&etime,start1,stop1);
其中 HEIGHT2=1080*2,WIDTH2=1920*2。但是etime=919.542419ms,时间太长了,怎么做才能减少时间?
【问题讨论】:
-
我想你实际上是在问你第一次打电话给
cufftPlan2d? -
@talonmies :实际上,我在调用 cufftPlan2d 之前调用了内核。像这样:lut_kernel>>(a,b,c);当lut_kernel完成后,执行cufftPlan2d(&plan1,HEIGHT2,WIDTH2,CUFFT_C2C)
-
但是是 first
cufftPlan2d调用吗? -
@talonmies:是的。
标签: cuda