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

Method DoFftWithDirectionInternal

tensorflow/stream_executor/rocm/rocm_fft.cc:540–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538
539template <typename FuncT, typename InputT, typename OutputT>
540bool ROCMFft::DoFftWithDirectionInternal(Stream *stream, fft::Plan *plan,
541 FuncT hipfftExec,
542 const DeviceMemory<InputT> &input,
543 DeviceMemory<OutputT> *output) {
544 ROCMFftPlan *rocm_fft_plan = dynamic_cast<ROCMFftPlan *>(plan);
545 if (rocm_fft_plan == nullptr) {
546 LOG(ERROR) << "the passed-in plan is not a ROCMFftPlan object.";
547 return false;
548 }
549
550 if (!SetStream(parent_, rocm_fft_plan->GetPlan(), stream)) {
551 return false;
552 }
553
554 auto ret = hipfftExec(parent_, rocm_fft_plan->GetPlan(),
555 GpuComplex(const_cast<InputT *>(GpuMemory(input))),
556 GpuComplex(GpuMemoryMutable(output)),
557 rocm_fft_plan->GetFftDirection());
558
559 if (ret != HIPFFT_SUCCESS) {
560 LOG(ERROR) << "failed to run rocFFT routine: " << ret;
561 return false;
562 }
563
564 return true;
565}
566
567#define STREAM_EXECUTOR_ROCM_DEFINE_FFT(__type, __fft_type1, __fft_type2, \
568 __fft_type3) \

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected