Skip to content

Commit

Permalink
integrate OpenCL into OpenVINO to enable clDNN
Browse files Browse the repository at this point in the history
Tracked-On: OAM-86770
Signed-off-by: dengliqiang <liqiangx.deng@intel.com>
  • Loading branch information
dengliqiang authored and sysopenci committed Sep 27, 2019
1 parent 64ec382 commit 4204051
Show file tree
Hide file tree
Showing 4 changed files with 1,245 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From c34a367bd0db1bfac587a4b1444fea2a1de94222 Mon Sep 17 00:00:00 2001
From: dengliqiang <liqiangx.deng@intel.com>
Date: Mon, 23 Sep 2019 22:40:48 +0800
Subject: [PATCH] Enable cldnn and cldnn_plugin compiling in Celadon

Tracked-On: OAM-86770
Signed-off-by: dengliqiang <liqiangx.deng@intel.com>
---
inference-engine/src/cldnn_engine/cldnn_engine.cpp | 5 +++++
inference-engine/src/cldnn_engine/cldnn_infer_request.cpp | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/inference-engine/src/cldnn_engine/cldnn_engine.cpp b/inference-engine/src/cldnn_engine/cldnn_engine.cpp
index 4b79fe6e..0f3fdf27 100644
--- a/inference-engine/src/cldnn_engine/cldnn_engine.cpp
+++ b/inference-engine/src/cldnn_engine/cldnn_engine.cpp
@@ -38,6 +38,11 @@ using InferenceEngine::Blob;
using namespace InferenceEngine;
using namespace details;

+#if defined(__ANDROID__)
+#define CI_BUILD_NUMBER "custom-master-android-nn"
+#endif
+
+
namespace CLDNNPlugin {

struct clDNNEngine::impl {
diff --git a/inference-engine/src/cldnn_engine/cldnn_infer_request.cpp b/inference-engine/src/cldnn_engine/cldnn_infer_request.cpp
index e36578cf..e7641a98 100644
--- a/inference-engine/src/cldnn_engine/cldnn_infer_request.cpp
+++ b/inference-engine/src/cldnn_engine/cldnn_infer_request.cpp
@@ -85,7 +85,11 @@ void CLDNNInferRequest::copyOutputData(const cldnn::memory& outputMemory,

switch (bptr->precision()) {
case Precision::FP32: {
- TBlob<float>::Ptr out_f = std::dynamic_pointer_cast<TBlob<float>>(bptr);
+#if defined(__ANDROID__)
+ TBlob<float>::Ptr out_f = std::static_pointer_cast<TBlob<float> >(bptr);
+#else
+ TBlob<float>::Ptr out_f = std::dynamic_pointer_cast<TBlob<float> >(bptr);
+#endif
if (out_f == nullptr) {
THROW_IE_EXCEPTION << "Invalid output blob";
}
--
2.23.0

Loading

0 comments on commit 4204051

Please sign in to comment.