Merge pull request #31933 from yifeif/cherrypicks_609B5

[r1.15 cherrypick] Add a note to ignore dlerror for CPU-only pip package
This commit is contained in:
Yifei Feng 2019-08-26 16:53:55 -07:00 committed by GitHub
commit 165b34d99a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,11 @@ void* GetDsoHandle() {
static auto handle = []() -> void* {
auto handle_or =
stream_executor::internal::DsoLoader::GetCudaRuntimeDsoHandle();
if (!handle_or.ok()) return nullptr;
if (!handle_or.ok()) {
LOG(INFO) << "Ignore above cudart dlerror if you do not have a GPU set "
"up on your machine.";
return nullptr;
}
return handle_or.ValueOrDie();
}();
return handle;