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
f23a86aa
Unverified
Commit
f23a86aa
authored
Aug 02, 2019
by
Scott Cyphers
Committed by
GitHub
Aug 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3352 from NervanaSystems/cyphers/plaidwin
Add windows symbol export support
parents
5c298a4a
c00d70b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
CMakeLists.txt
src/ngraph/runtime/plaidml/CMakeLists.txt
+2
-0
plaidml_backend_visibility.hpp
src/ngraph/runtime/plaidml/plaidml_backend_visibility.hpp
+50
-0
No files found.
src/ngraph/runtime/plaidml/CMakeLists.txt
View file @
f23a86aa
...
...
@@ -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 @
f23a86aa
//*****************************************************************************
// 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
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