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

[tensorpipe] create a new port #16472

Merged
merged 23 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
80b749a
[tensorpipe] create a new port
luncliff Feb 26, 2021
e7813ce
[tensorpipe] create patch for libuv
luncliff Mar 1, 2021
d8846a8
[libnop] create a new port
luncliff Mar 1, 2021
517c730
[libnop] update baseline and port SHA
luncliff Mar 1, 2021
eb02a1d
[tensorpipe] fix header/target install
luncliff Mar 1, 2021
efba0c2
[tensorpipe] remove support of Windows/UWP
luncliff Mar 1, 2021
05524b7
Merge branch 'port/libnop' into port/tensorpipe
luncliff Mar 1, 2021
f7d6797
[tensorpipe] update baseline and port SHA
luncliff Mar 1, 2021
004bafb
Merge branch 'master' into port/tensorpipe
luncliff Mar 2, 2021
1f92cd6
Update ports/tensorpipe/portfile.cmake
luncliff Mar 2, 2021
a0d6424
Update ports/tensorpipe/portfile.cmake
luncliff Mar 2, 2021
b208b9a
[tensorpipe] support 'test' feature for Linux
luncliff Mar 2, 2021
cd45fdc
[tensorpipe] fix build failures in Linux
luncliff Mar 5, 2021
a0c1966
[tensorpipe] apply PR feedback
luncliff Mar 5, 2021
c41b345
[tensorpipe] update version-date and patches
luncliff Mar 20, 2021
932378f
[tensorpipe] FATAL_ERROR if feature requires Linux
luncliff Mar 20, 2021
d60ee45
[tensorpipe] reduce features and code base
luncliff Apr 10, 2021
d33dbd0
[tensorpipe] update baseline
luncliff Apr 10, 2021
87ae207
[tensorpipe] update support
luncliff Apr 10, 2021
1de1fad
[tensorpipe] fix Linux/CUDA test options
luncliff May 1, 2021
061504f
[tensorpipe] fix corrupted patch
luncliff May 1, 2021
97bb90b
[tensorpipe] fix wrong support expression
luncliff May 1, 2021
631a39b
Merge branch 'master' into port/tensorpipe
luncliff May 2, 2021
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
45 changes: 45 additions & 0 deletions ports/tensorpipe/fix-cmakelists.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75f2e63..3882d49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,5 +29,5 @@ endif()
add_subdirectory(tensorpipe)

install(EXPORT TensorpipeTargets
- DESTINATION share/cmake/Tensorpipe
+ DESTINATION share/${PROJECT_NAME}
FILE TensorpipeTargets.cmake)
diff --git a/tensorpipe/CMakeLists.txt b/tensorpipe/CMakeLists.txt
index 0a0944b..b7ff4fa 100644
--- a/tensorpipe/CMakeLists.txt
+++ b/tensorpipe/CMakeLists.txt
@@ -118,8 +118,9 @@ target_sources(tensorpipe PRIVATE
transport/uv/loop.cc
transport/uv/sockaddr.cc
transport/uv/utility.cc)
-find_package(uv REQUIRED)
-target_link_libraries(tensorpipe PRIVATE uv::uv)
+# use VcPkg's `libuv`
+find_package(unofficial-libuv CONFIG REQUIRED)
+target_link_libraries(tensorpipe PRIVATE unofficial::libuv::libuv)

### shm

@@ -204,7 +205,15 @@ endif()

## Install

+install(DIRECTORY channel common core transport util
+ DESTINATION include/tensorpipe
+ FILES_MATCHING PATTERN "*.h")
+
+install(FILES tensorpipe.h
+ DESTINATION include/tensorpipe)
+
install(TARGETS tensorpipe
EXPORT TensorpipeTargets
- LIBRARY DESTINATION ${TP_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${TP_INSTALL_LIBDIR})
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
35 changes: 35 additions & 0 deletions ports/tensorpipe/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
vcpkg_fail_port_install(ON_TARGET "windows" "uwp")
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pytorch/tensorpipe
REF a9aa71a2fe49a8e8475cd5ff16cbd0de13b67c2b
SHA512 8b2679d4325acc6cd669326504bb49a645c126586b1d61d873d5a0423ed27e7c513574ccd2e74bdd792869167d3daba0804f127e21cfd5831d37a6d1ef7a79ba
PATCHES
fix-cmakelists.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
cuda TP_USE_CUDA
cuda TP_ENABLE_CUDA_IPC
shm TP_ENABLE_SHM
ibv TP_ENABLE_IBV
cma TP_ENABLE_CMA
pybind11 TP_BUILD_PYTHON
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
${FEATURE_OPTIONS}
-DTP_BUILD_TESTING=OFF -DTP_BUILD_BENCHMARK=OFF -DTP_BUILD_LIBUV=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()

file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
34 changes: 34 additions & 0 deletions ports/tensorpipe/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "tensorpipe",
"version-date": "2021-02-26",
"description": "A tensor-aware point-to-point communication primitive for machine learning",
"homepage": "https://github.com/pytorch/tensorpipe",
"supports": "!windows",
"dependencies": [
"libnop",
"libuv"
],
"features": {
"cma": {
"description": "Enable cma channel"
},
"cuda": {
"description": "Enable support for CUDA tensors, CUDA IPC channel",
"dependencies": [
"cuda"
]
},
"ibv": {
"description": "Enable InfiniBand transport"
},
"pybind11": {
"description": "Build python bindings",
"dependencies": [
"pybind11"
]
},
"shm": {
"description": "Enable shm transport"
}
}
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5760,6 +5760,10 @@
"baseline": "2.3.1",
"port-version": 1
},
"tensorpipe": {
"baseline": "2021-02-26",
"port-version": 0
},
"termcolor": {
"baseline": "1.0.1",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/t-/tensorpipe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "244ed86bbb0ab9c244c38e3ee8f71a2fdc7d30a4",
"version-date": "2021-02-26",
"port-version": 0
}
]
}