summaryrefslogtreecommitdiffstats
path: root/parallel-libs/streamexecutor/lib/PlatformManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parallel-libs/streamexecutor/lib/PlatformManager.cpp')
-rw-r--r--parallel-libs/streamexecutor/lib/PlatformManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/parallel-libs/streamexecutor/lib/PlatformManager.cpp b/parallel-libs/streamexecutor/lib/PlatformManager.cpp
index 7304cca755c..8f44befbd71 100644
--- a/parallel-libs/streamexecutor/lib/PlatformManager.cpp
+++ b/parallel-libs/streamexecutor/lib/PlatformManager.cpp
@@ -13,8 +13,14 @@
//===----------------------------------------------------------------------===//
#include "streamexecutor/PlatformManager.h"
+
+#include "streamexecutor/PlatformOptions.h"
#include "streamexecutor/platforms/host/HostPlatform.h"
+#ifdef STREAM_EXECUTOR_ENABLE_CUDA_PLATFORM
+#include "streamexecutor/platforms/cuda/CUDAPlatform.h"
+#endif
+
namespace streamexecutor {
PlatformManager::PlatformManager() {
@@ -26,6 +32,10 @@ PlatformManager::PlatformManager() {
// themselves when they are loaded.
PlatformsByName.emplace("host", llvm::make_unique<host::HostPlatform>());
+
+#ifdef STREAM_EXECUTOR_ENABLE_CUDA_PLATFORM
+ PlatformsByName.emplace("cuda", llvm::make_unique<cuda::CUDAPlatform>());
+#endif
}
Expected<Platform *> PlatformManager::getPlatformByName(llvm::StringRef Name) {
OpenPOWER on IntegriCloud