Skip to content

Commit

Permalink
[nvidia-triton-common] Create a new port (#161)
Browse files Browse the repository at this point in the history
* [nvidia-cnmem] create a new port

* [nvidia-cnmen] update baseline

* [nvidia-tools-extension-sdk] new port for NVTX

* [nvidia-tools-extension-sdk] update baseline

* [nvidia-triton-common] create a new port

* [nvidia-triton-common] update baseline

* ci: test nvidia-triton-common
  • Loading branch information
luncliff authored Jan 24, 2024
1 parent 7c14771 commit 3d0a6ad
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 0 deletions.
83 changes: 83 additions & 0 deletions ports/nvidia-triton-common/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 85ebda6..43f6040 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -200,4 +200,3 @@ set_target_properties(
OUTPUT_NAME tritontableprinter
)

-add_subdirectory(test)
diff --git a/protobuf/CMakeLists.txt b/protobuf/CMakeLists.txt
index 5a9677b..7e70a93 100644
--- a/protobuf/CMakeLists.txt
+++ b/protobuf/CMakeLists.txt
@@ -157,7 +157,6 @@ if(${TRITON_COMMON_ENABLE_GRPC})
FILES
${CMAKE_CURRENT_BINARY_DIR}/grpc_service.grpc.pb.h
DESTINATION include
- OPTIONAL
)
endif()

@@ -210,6 +209,5 @@ if(${TRITON_COMMON_ENABLE_GRPC})
FILES
${CMAKE_CURRENT_BINARY_DIR}/health.grpc.pb.h
DESTINATION include
- OPTIONAL
)
endif()
diff --git a/protobuf/CMakeLists.txt b/protobuf/CMakeLists.txt
index 7e70a93..875896c 100644
--- a/protobuf/CMakeLists.txt
+++ b/protobuf/CMakeLists.txt
@@ -53,7 +53,7 @@ if(${TRITON_COMMON_ENABLE_PROTOBUF})
endif()

add_library(
- proto-library EXCLUDE_FROM_ALL OBJECT
+ proto-library STATIC
${PROTO_SRCS} ${PROTO_HDRS}
)

@@ -61,6 +61,7 @@ if(${TRITON_COMMON_ENABLE_PROTOBUF})
proto-library
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_compile_options(
@@ -126,7 +127,7 @@ if(${TRITON_COMMON_ENABLE_GRPC})
endif()

add_library(
- grpc-service-library EXCLUDE_FROM_ALL OBJECT
+ grpc-service-library STATIC
${GRPC_SRCS} ${GRPC_HDRS}
)

@@ -134,6 +135,7 @@ if(${TRITON_COMMON_ENABLE_GRPC})
grpc-service-library
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_compile_options(
@@ -182,7 +184,7 @@ if(${TRITON_COMMON_ENABLE_GRPC})
)

add_library(
- grpc-health-library EXCLUDE_FROM_ALL OBJECT
+ grpc-health-library STATIC
${HEALTH_SRCS} ${HEALTH_HDRS}
)

@@ -190,6 +192,7 @@ if(${TRITON_COMMON_ENABLE_GRPC})
grpc-health-library
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_compile_options(
33 changes: 33 additions & 0 deletions ports/nvidia-triton-common/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO triton-inference-server/common
REF 1ef550b8ec9793a053290147bc330128f5b5f7d0
SHA512 026aca7328011faa29cf07481de3ddfbf4c10e3fa13562789e7204faf40c0c333ca18a8cf82228262441fcb1e71fe9313ed2cc1199a75398c01668bf3a346260
HEAD_REF main
PATCHES
fix-cmake.patch
)

vcpkg_find_acquire_program(PYTHON3)
message(STATUS "Using python3: ${PYTHON3}")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPython_EXECUTABLE:FILEPATH=${PYTHON3}
-DTRITON_COMMON_ENABLE_PROTOBUF=ON
-DTRITON_COMMON_ENABLE_GRPC=ON
-DTRITON_COMMON_ENABLE_JSON=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/TritonCommon PACKAGE_NAME TritonCommon)
vcpkg_copy_pdbs()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
29 changes: 29 additions & 0 deletions ports/nvidia-triton-common/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "nvidia-triton-common",
"version-date": "2023-01-23",
"description": "Common source, scripts and utilities shared across all Triton repositories.",
"homepage": "https://github.com/triton-inference-server/common",
"license": "BSD-3-Clause",
"dependencies": [
{
"name": "grpc",
"host": true,
"features": [
"codegen"
]
},
{
"name": "protobuf",
"host": true
},
"rapidjson",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
1 change: 1 addition & 0 deletions test/self-hosted-cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"nvidia-cnmem",
"nvidia-tools-extension-sdk",
"nvidia-triton-common",
{
"name": "onnxruntime",
"features": [
Expand Down
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
"baseline": "3.1.0",
"port-version": 0
},
"nvidia-triton-common": {
"baseline": "2023-01-23",
"port-version": 0
},
"onnx": {
"baseline": "1.15.0",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/n-/nvidia-triton-common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "111df5b6ec99aebbc1c8dee1ef33b50ca2acf2c4",
"version-date": "2023-01-23",
"port-version": 0
}
]
}

0 comments on commit 3d0a6ad

Please sign in to comment.