-1

300,000 ポイントの配列があり、600 ポイントごとの fft が必要です。cufftPlanMany を使用して実行しようとしていますが、ここで不明なエラーが発生します。

cufftSafeCall(cufftPlanMany(&plan, rank, n, NULL, istride, idist, NULL, 1,1, CUFFT_C2C, 500));

retrevialfft.cu(82) : cufftSafeCall() CUFFT error: <unknown>

コンテキスト内のコードは次のとおりです

  cudaSetDevice(0);

  // Allocate host memory for the signal
  cufftComplex* h_signal=(cufftComplex*)malloc(sizeof(cufftComplex) * SIGNAL_SIZE);


  // Initalize the memory for the signal
  for (unsigned int i = 0; i < SIGNAL_SIZE; ++i) {
    h_signal[i].x = rand() / (float)RAND_MAX;
    h_signal[i].y = 0;

    //    printf("Orignal: %f %f \n", h_signal[i].x, h_signal[i].y);
  }




  int mem_size = sizeof(cufftComplex) * SIGNAL_SIZE;

  // Allocate device memory for signal
  cufftComplex* d_signal;
  cudaMalloc((void**)&d_signal, mem_size);

   int rank = 1; //1d plan                                                                                                                     
   int numCols = 300000;
   int n[] = {numCols};

   int batch = 500;
   int istride = 1;
   int ostride = 1;
   int idist = numCols;

  // CUFFT plan                                                                                                                                
   cufftHandle plan;
   cufftSafeCall(cufftPlanMany(&plan, rank, n, NULL, istride, idist, NULL, 1,1, CUFFT_C2C, 500));

  // Transform signal                                                                                                                          
  printf("Transforming signal cufftExecC2C\n");
  cufftSafeCall(cufftExecC2C(plan, (cufftComplex *)d_signal, (cufftComplex *)d_signal, CUFFT_FORWARD));



     // Copy device memory to host                                                                                                                
  cufftComplex* h_transformed = (cufftComplex*)malloc(sizeof(cufftComplex) * SIGNAL_SIZE);;
  cudaMemcpy(h_transformed, d_signal, mem_size,
                           cudaMemcpyDeviceToHost);



//Destroy CUFFT context                                                                                                                      
  cufftDestroy(plan);

  // cleanup memory                                                                                                                            
  free(h_signal);

  free(h_transformed);
  cudaFree(d_signal);
  cudaDeviceReset();

エラーが実際に何であるかについて何か考えはありますか?

4

1 に答える 1