From 3367f66a9a89b493ab4d38c36f5e3989fed504a1 Mon Sep 17 00:00:00 2001 From: Christian Sigg Date: Tue, 27 Aug 2019 14:38:54 -0700 Subject: [PATCH] Handle PLATFORM_WINDOWS in stream_executor. PiperOrigin-RevId: 265769809 --- tensorflow/stream_executor/platform/dso_loader.h | 2 +- tensorflow/stream_executor/platform/platform.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tensorflow/stream_executor/platform/dso_loader.h b/tensorflow/stream_executor/platform/dso_loader.h index 1dd56684b19..dd752e962c8 100644 --- a/tensorflow/stream_executor/platform/dso_loader.h +++ b/tensorflow/stream_executor/platform/dso_loader.h @@ -22,7 +22,7 @@ limitations under the License. #if defined(PLATFORM_GOOGLE) #include "tensorflow/stream_executor/platform/google/dso_loader.h" #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ - defined(PLATFORM_GOOGLE_ANDROID) + defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_WINDOWS) #include "tensorflow/stream_executor/platform/default/dso_loader.h" #else #error Define the appropriate PLATFORM_ macro for this platform diff --git a/tensorflow/stream_executor/platform/platform.h b/tensorflow/stream_executor/platform/platform.h index 5bf0e120d39..b7c615c72ad 100644 --- a/tensorflow/stream_executor/platform/platform.h +++ b/tensorflow/stream_executor/platform/platform.h @@ -16,8 +16,9 @@ limitations under the License. #ifndef TENSORFLOW_STREAM_EXECUTOR_PLATFORM_PLATFORM_H_ #define TENSORFLOW_STREAM_EXECUTOR_PLATFORM_PLATFORM_H_ -#if !defined(PLATFORM_POSIX) && !defined(PLATFORM_GOOGLE) && \ - !defined(PLATFORM_POSIX_ANDROID) && !defined(PLATFORM_GOOGLE_ANDROID) +#if !defined(PLATFORM_POSIX) && !defined(PLATFORM_GOOGLE) && \ + !defined(PLATFORM_POSIX_ANDROID) && !defined(PLATFORM_GOOGLE_ANDROID) && \ + !defined(PLATFORM_WINDOWS) // Choose which platform we are on. #if defined(ANDROID) || defined(__ANDROID__) @@ -26,6 +27,9 @@ limitations under the License. #elif defined(__APPLE__) #define PLATFORM_POSIX +#elif defined(_WIN32) +#define PLATFORM_WINDOWS + #else // If no platform specified, use: #define PLATFORM_POSIX