MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DoFftInternal

Method DoFftInternal

tensorflow/stream_executor/rocm/rocm_fft.cc:514–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512
513template <typename FuncT, typename InputT, typename OutputT>
514bool ROCMFft::DoFftInternal(Stream *stream, fft::Plan *plan, FuncT hipfftExec,
515 const DeviceMemory<InputT> &input,
516 DeviceMemory<OutputT> *output) {
517 ROCMFftPlan *rocm_fft_plan = dynamic_cast<ROCMFftPlan *>(plan);
518 if (rocm_fft_plan == nullptr) {
519 LOG(ERROR) << "the passed-in plan is not a ROCMFftPlan object.";
520 return false;
521 }
522
523 if (!SetStream(parent_, rocm_fft_plan->GetPlan(), stream)) {
524 return false;
525 }
526
527 auto ret = hipfftExec(parent_, rocm_fft_plan->GetPlan(),
528 GpuComplex(const_cast<InputT *>(GpuMemory(input))),
529 GpuComplex(GpuMemoryMutable(output)));
530
531 if (ret != HIPFFT_SUCCESS) {
532 LOG(ERROR) << "failed to run rocFFT routine: " << ret;
533 return false;
534 }
535
536 return true;
537}
538
539template <typename FuncT, typename InputT, typename OutputT>
540bool ROCMFft::DoFftWithDirectionInternal(Stream *stream, fft::Plan *plan,

Callers

nothing calls this directly

Calls 5

GpuComplexFunction · 0.85
GpuMemoryFunction · 0.85
GpuMemoryMutableFunction · 0.85
SetStreamFunction · 0.70
GetPlanMethod · 0.45

Tested by

no test coverage detected