Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions xla/stream_executor/cuda/cuda_blas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,16 @@ absl::Status CUDABlas::GetVersion(std::string *version) {
}

void initialize_cublas() {
// Check if already registered before attempting - prevents duplicate
// registration error messages (can happen with multiple library loads)
auto already_registered = PluginRegistry::Instance()->HasFactory(
kCudaPlatformId, PluginKind::kBlas);

if (already_registered) {
// Already registered, skip silently (mimics ROCm behavior)
return;
}

absl::Status status =
PluginRegistry::Instance()->RegisterFactory<PluginRegistry::BlasFactory>(
kCudaPlatformId, "cuBLAS",
Expand Down
10 changes: 10 additions & 0 deletions xla/stream_executor/cuda/cuda_dnn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6947,6 +6947,16 @@ absl::Status CudnnGraph::PopulateOrUpdateRawCommandBuffer(
} // namespace gpu

void initialize_cudnn() {
// Check if already registered before attempting - prevents duplicate
// registration error messages (can happen with multiple library loads)
auto already_registered = PluginRegistry::Instance()->HasFactory(
cuda::kCudaPlatformId, PluginKind::kDnn);

if (already_registered) {
// Already registered, skip silently (mimics ROCm behavior)
return;
}

absl::Status status =
PluginRegistry::Instance()->RegisterFactory<PluginRegistry::DnnFactory>(
cuda::kCudaPlatformId, "cuDNN",
Expand Down
10 changes: 10 additions & 0 deletions xla/stream_executor/cuda/cuda_fft.cc
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,16 @@ STREAM_EXECUTOR_CUDA_DEFINE_FFT(double, Z2Z, D2Z, Z2D)
} // namespace gpu

void initialize_cufft() {
// Check if already registered before attempting - prevents duplicate
// registration error messages (can happen with multiple library loads)
auto already_registered = PluginRegistry::Instance()->HasFactory(
cuda::kCudaPlatformId, PluginKind::kFft);

if (already_registered) {
// Already registered, skip silently (mimics ROCm behavior)
return;
}

absl::Status status =
PluginRegistry::Instance()->RegisterFactory<PluginRegistry::FftFactory>(
cuda::kCudaPlatformId, "cuFFT",
Expand Down
Loading