Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[oneDNN] New port #15068

Merged
merged 8 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ports/onednn/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO oneapi-src/oneDNN
REF v2.0
SHA512 740fa871e29edc8bb8a54d4ba615e856712f7f63efe4c70f4a3d5f6d143d60bc51366b9355ab4b6702718ba711b48350ea49b1335ec10c1dc4f655cc9728ff3e
HEAD_REF master
)

# Linkeage (default in oneDNN is shared)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC)
if (ENABLE_STATIC)
list(APPEND DNNL_OPTIONS "-DDNNL_LIBRARY_TYPE=STATIC")
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${DNNL_OPTIONS}
)
vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

# Copyright and license
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/onednn RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/onednn RENAME license)
6 changes: 6 additions & 0 deletions ports/onednn/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "onednn",
"version-string": "2.0",
"description": "oneAPI Deep Neural Network Library (oneDNN)",
"supports": "x64 & !uwp"
}