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

Function initialize_rocfft

tensorflow/stream_executor/rocm/rocm_fft.cc:595–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593} // namespace gpu
594
595void initialize_rocfft() {
596 auto rocFftAlreadyRegistered = PluginRegistry::Instance()->HasFactory(
597 rocm::kROCmPlatformId, PluginKind::kFft, gpu::kRocFftPlugin);
598
599 if (!rocFftAlreadyRegistered) {
600 port::Status status =
601 PluginRegistry::Instance()->RegisterFactory<PluginRegistry::FftFactory>(
602 rocm::kROCmPlatformId, gpu::kRocFftPlugin, "rocFFT",
603 [](internal::StreamExecutorInterface *parent) -> fft::FftSupport * {
604 gpu::GpuExecutor *rocm_executor =
605 dynamic_cast<gpu::GpuExecutor *>(parent);
606 if (rocm_executor == nullptr) {
607 LOG(ERROR)
608 << "Attempting to initialize an instance of the rocFFT "
609 << "support library with a non-ROCM StreamExecutor";
610 return nullptr;
611 }
612
613 return new gpu::ROCMFft(rocm_executor);
614 });
615 if (!status.ok()) {
616 LOG(ERROR) << "Unable to register rocFFT factory: "
617 << status.error_message();
618 }
619
620 PluginRegistry::Instance()->SetDefaultFactory(
621 rocm::kROCmPlatformId, PluginKind::kFft, gpu::kRocFftPlugin);
622 }
623}
624
625} // namespace stream_executor
626

Callers 1

rocm_fft.ccFile · 0.85

Calls 3

HasFactoryMethod · 0.80
SetDefaultFactoryMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected