diff --git a/tensorflow/stream_executor/platform/default/dso_loader.cc b/tensorflow/stream_executor/platform/default/dso_loader.cc index fb7d88aaedb..01af4114536 100644 --- a/tensorflow/stream_executor/platform/default/dso_loader.cc +++ b/tensorflow/stream_executor/platform/default/dso_loader.cc @@ -101,13 +101,11 @@ port::StatusOr GetCurandDsoHandle() { } port::StatusOr GetCuptiDsoHandle() { -#if defined(ANDROID_TEGRA) - // On Android devices the CUDA version number is not added to the library - // name. + // Load specific version of CUPTI this is built. + auto status_or_handle = GetDsoHandle("cupti", GetCudaVersion()); + if (status_or_handle.ok()) return status_or_handle; + // Load whatever libcupti.so user specified. return GetDsoHandle("cupti", ""); -#else - return GetDsoHandle("cupti", GetCudaVersion()); -#endif } port::StatusOr GetCudnnDsoHandle() {