diff options
Diffstat (limited to 'tensorflow/stream_executor/cuda/cuda_diagnostics.cc')
-rw-r--r-- | tensorflow/stream_executor/cuda/cuda_diagnostics.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tensorflow/stream_executor/cuda/cuda_diagnostics.cc b/tensorflow/stream_executor/cuda/cuda_diagnostics.cc index def28053f4..01ce67252e 100644 --- a/tensorflow/stream_executor/cuda/cuda_diagnostics.cc +++ b/tensorflow/stream_executor/cuda/cuda_diagnostics.cc @@ -57,7 +57,7 @@ namespace cuda { #ifdef __APPLE__ static const CFStringRef kDriverKextIdentifier = CFSTR("com.nvidia.CUDA"); -#else +#elif !defined(PLATFORM_WINDOWS) static const char *kDriverVersionPath = "/proc/driver/nvidia/version"; #endif @@ -341,6 +341,12 @@ port::StatusOr<DriverVersion> Diagnostician::FindKernelDriverVersion() { CFStringGetCStringPtr(kDriverKextIdentifier, kCFStringEncodingUTF8)) }; return status; +#elif defined(PLATFORM_WINDOWS) + auto status = + port::Status{port::error::UNIMPLEMENTED, + "kernel reported driver version not implemented on Windows" + }; + return status; #else FILE *driver_version_file = fopen(kDriverVersionPath, "r"); if (driver_version_file == nullptr) { |