Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
f23d3458
Commit
f23d3458
authored
Jul 31, 2019
by
Scott Cyphers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add windows symbol export support
Fix incorrect exports
parent
30603191
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
6 deletions
+62
-6
CMakeLists.txt
src/ngraph/runtime/plaidml/CMakeLists.txt
+2
-0
plaidml_backend_visibility.hpp
src/ngraph/runtime/plaidml/plaidml_backend_visibility.hpp
+50
-0
plaidml_ops_convolution.hpp
src/ngraph/runtime/plaidml/plaidml_ops_convolution.hpp
+4
-3
plaidml_ops_implicit_broadcast.hpp
...ngraph/runtime/plaidml/plaidml_ops_implicit_broadcast.hpp
+2
-1
plaidml_ops_replicate.hpp
src/ngraph/runtime/plaidml/plaidml_ops_replicate.hpp
+2
-1
plaidml_ops_winograd.hpp
src/ngraph/runtime/plaidml/plaidml_ops_winograd.hpp
+2
-1
No files found.
src/ngraph/runtime/plaidml/CMakeLists.txt
View file @
f23d3458
...
...
@@ -74,6 +74,8 @@ target_include_directories(plaidml_backend SYSTEM PUBLIC ${PLAIDML_INCLUDE_DIRS}
target_link_libraries
(
plaidml_backend PUBLIC ngraph libplaidml
)
install
(
TARGETS plaidml_backend LIBRARY DESTINATION
${
NGRAPH_INSTALL_LIB
}
)
target_compile_definitions
(
plaidml_backend PRIVATE PLAIDML_BACKEND_DLL_EXPORTS
)
set
(
CMAKE_MACOSX_RPATH 1
)
if
(
APPLE
)
set_property
(
TARGET plaidml_backend PROPERTY INSTALL_RPATH
"@loader_path/;@loader_path/../../.."
)
...
...
src/ngraph/runtime/plaidml/plaidml_backend_visibility.hpp
0 → 100644
View file @
f23d3458
//*****************************************************************************
// Copyright 2017-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
// https://gcc.gnu.org/wiki/Visibility
// Generic helper definitions for shared library support
#if defined _WIN32 || defined __CYGWIN__
#define PLAIDML_BACKEND_HELPER_DLL_IMPORT __declspec(dllimport)
#define PLAIDML_BACKEND_HELPER_DLL_EXPORT __declspec(dllexport)
#define PLAIDML_BACKEND_HELPER_DLL_LOCAL
#else
#if __GNUC__ >= 4
#define PLAIDML_BACKEND_HELPER_DLL_IMPORT __attribute__((visibility("default")))
#define PLAIDML_BACKEND_HELPER_DLL_EXPORT __attribute__((visibility("default")))
#define PLAIDML_BACKEND_HELPER_DLL_LOCAL __attribute__((visibility("hidden")))
#else
#define PLAIDML_BACKEND_HELPER_DLL_IMPORT
#define PLAIDML_BACKEND_HELPER_DLL_EXPORT
#define PLAIDML_BACKEND_HELPER_DLL_LOCAL
#endif
#endif
// Now we use the generic helper definitions above to define PLAIDML_BACKEND_API and PLAIDML_BACKEND_LOCAL.
// PLAIDML_BACKEND_API is used for the public API symbols. It either DLL imports or DLL exports
// (or does nothing for static build)
// PLAIDML_BACKEND_LOCAL is used for non-api symbols.
// #ifdef PLAIDML_BACKEND_DLL // defined if PLAIDML_BACKEND is compiled as a DLL
#ifdef PLAIDML_BACKEND_DLL_EXPORTS // defined if we are building the PLAIDML_BACKEND DLL (instead of using it)
#define PLAIDML_BACKEND_API PLAIDML_BACKEND_HELPER_DLL_EXPORT
#else
#define PLAIDML_BACKEND_API PLAIDML_BACKEND_HELPER_DLL_IMPORT
#endif // PLAIDML_BACKEND_DLL_EXPORTS
#define PLAIDML_BACKEND_LOCAL PLAIDML_BACKEND_HELPER_DLL_LOCAL
// #else // PLAIDML_BACKEND_DLL is not defined: this means PLAIDML_BACKEND is a static lib.
// #define PLAIDML_BACKEND_API
// #define PLAIDML_BACKEND_LOCAL
// #endif // PLAIDML_BACKEND_DLL
src/ngraph/runtime/plaidml/plaidml_ops_convolution.hpp
View file @
f23d3458
...
...
@@ -19,6 +19,7 @@
#include "ngraph/axis_vector.hpp"
#include "ngraph/op/convolution.hpp"
#include "ngraph/op/op.hpp"
#include "ngraph/runtime/plaidml/plaidml_backend_visibility.hpp"
namespace
ngraph
{
...
...
@@ -39,7 +40,7 @@ namespace ngraph
class
ngraph
::
runtime
::
plaidml
::
op
::
Convolution
final
:
public
ngraph
::
op
::
Op
{
public
:
NGRAPH
_API
PLAIDML_BACKEND
_API
static
const
std
::
string
type_name
;
const
std
::
string
&
description
()
const
override
{
return
type_name
;
}
Convolution
(
std
::
shared_ptr
<
ngraph
::
op
::
Convolution
>
src
,
...
...
@@ -66,7 +67,7 @@ private:
class
ngraph
::
runtime
::
plaidml
::
op
::
ConvolutionBackpropData
final
:
public
ngraph
::
op
::
Op
{
public
:
NGRAPH
_API
PLAIDML_BACKEND
_API
static
const
std
::
string
type_name
;
const
std
::
string
&
description
()
const
override
{
return
type_name
;
}
ConvolutionBackpropData
(
std
::
shared_ptr
<
ngraph
::
op
::
ConvolutionBackpropData
>
src
,
...
...
@@ -93,7 +94,7 @@ private:
class
ngraph
::
runtime
::
plaidml
::
op
::
ConvolutionBackpropFilters
final
:
public
ngraph
::
op
::
Op
{
public
:
NGRAPH
_API
PLAIDML_BACKEND
_API
static
const
std
::
string
type_name
;
const
std
::
string
&
description
()
const
override
{
return
type_name
;
}
ConvolutionBackpropFilters
(
std
::
shared_ptr
<
ngraph
::
op
::
ConvolutionBackpropFilters
>
src
,
...
...
src/ngraph/runtime/plaidml/plaidml_ops_implicit_broadcast.hpp
View file @
f23d3458
...
...
@@ -19,6 +19,7 @@
#include <memory>
#include "ngraph/op/op.hpp"
#include "ngraph/runtime/plaidml/plaidml_backend_visibility.hpp"
namespace
ngraph
{
...
...
@@ -40,7 +41,7 @@ namespace ngraph
class
ngraph
::
runtime
::
plaidml
::
op
::
ImplicitBroadcast
final
:
public
ngraph
::
op
::
Op
{
public
:
NGRAPH
_API
PLAIDML_BACKEND
_API
static
const
std
::
string
type_name
;
const
std
::
string
&
description
()
const
override
{
return
type_name
;
}
ImplicitBroadcast
(
const
Output
<
Node
>&
input
,
const
Shape
&
shape
);
...
...
src/ngraph/runtime/plaidml/plaidml_ops_replicate.hpp
View file @
f23d3458
...
...
@@ -19,6 +19,7 @@
#include <vector>
#include "ngraph/op/op.hpp"
#include "ngraph/runtime/plaidml/plaidml_backend_visibility.hpp"
namespace
ngraph
{
...
...
@@ -39,7 +40,7 @@ namespace ngraph
class
ngraph
::
runtime
::
plaidml
::
op
::
Replicate
final
:
public
ngraph
::
op
::
Op
{
public
:
NGRAPH
_API
PLAIDML_BACKEND
_API
static
const
std
::
string
type_name
;
const
std
::
string
&
description
()
const
override
{
return
type_name
;
}
Replicate
(
const
Output
<
Node
>&
arg
,
std
::
size_t
replication_axis
,
std
::
size_t
replication_count
);
...
...
src/ngraph/runtime/plaidml/plaidml_ops_winograd.hpp
View file @
f23d3458
...
...
@@ -19,6 +19,7 @@
#include <memory>
#include "ngraph/op/op.hpp"
#include "ngraph/runtime/plaidml/plaidml_backend_visibility.hpp"
#include "ngraph/runtime/plaidml/plaidml_ops_convolution.hpp"
namespace
ngraph
...
...
@@ -38,7 +39,7 @@ namespace ngraph
class
ngraph
::
runtime
::
plaidml
::
op
::
Winograd
final
:
public
ngraph
::
op
::
Op
{
public
:
NGRAPH
_API
PLAIDML_BACKEND
_API
static
const
std
::
string
type_name
;
const
std
::
string
&
description
()
const
override
{
return
type_name
;
}
Winograd
(
std
::
shared_ptr
<
Convolution
>
conv
,
const
OutputVector
&
args
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment