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

[nvidia-triton-core] Create a new port #162

Merged
merged 3 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
66 changes: 66 additions & 0 deletions ports/nvidia-triton-core/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4a3d692..afe7c02 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -38,17 +38,7 @@ endif()
# We must include the transitive closure of all repos so that we can
# override the tag.
#
-include(FetchContent)
-
-FetchContent_Declare(
- repo-common
- GIT_REPOSITORY https://github.com/triton-inference-server/common.git
- GIT_TAG ${TRITON_COMMON_REPO_TAG}
-)
-
-set(TRITON_COMMON_ENABLE_PROTOBUF ON)
-
-FetchContent_MakeAvailable(repo-common)
+find_package(TritonCommon CONFIG REQUIRED)

#
# CUDA
@@ -253,6 +243,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
PRIVATE
/W1 /D_WIN32_WINNT=0x0A00 /EHsc /Zc:preprocessor
)
+ target_compile_definitions(
+ triton-core
+ PRIVATE
+ NOMINMAX
+ )
else()
target_compile_options(
triton-core
@@ -452,14 +447,14 @@ find_package(re2 REQUIRED)
target_link_libraries(
triton-core
PRIVATE
- proto-library # from repo-common
- triton-common-async-work-queue # from repo-common
- triton-common-thread-pool # from repo-common
- triton-common-error # from repo-common
- triton-common-model-config # from repo-common
- triton-common-logging # from repo-common
- triton-common-json # from repo-common
- triton-common-table-printer # from repo-common
+ TritonCommon::proto-library # from repo-common
+ TritonCommon::triton-common-async-work-queue # from repo-common
+ TritonCommon::triton-common-thread-pool # from repo-common
+ TritonCommon::triton-common-error # from repo-common
+ TritonCommon::triton-common-model-config # from repo-common
+ TritonCommon::triton-common-logging # from repo-common
+ TritonCommon::triton-common-json # from repo-common
+ TritonCommon::triton-common-table-printer # from repo-common
protobuf::libprotobuf
re2::re2
)
@@ -522,6 +517,7 @@ if(${TRITON_ENABLE_METRICS_GPU})
)
endif() # TRITON_ENABLE_METRICS_GPU

+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../include/ DESTINATION include)
install(
TARGETS
triton-core
44 changes: 44 additions & 0 deletions ports/nvidia-triton-core/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO triton-inference-server/core
REF f0ff1e5de579e7c2322c78002b09b22463581f4c
SHA512 437a47ce9a97212869cc19b152174b390f83e7c55c8f152a848b2fc76c5fc651eeb9349d0024d15df84405620c994e7a717d698eb2934c3e3b0c2a283cb14393
HEAD_REF main
PATCHES
fix-cmake.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
google-cloud-storage TRITON_ENABLE_GCS
aws-s3 TRITON_ENABLE_S3
azure-storage TRITON_ENABLE_AZURE_STORAGE
mali-gpu TRITON_ENABLE_MALI_GPU
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/src"
OPTIONS
${FEATURE_OPTIONS}
-DTRITON_MIN_CXX_STANDARD=17
-DTRITON_CORE_HEADERS_ONLY=OFF
-DTRITON_ENABLE_LOGGING=ON
-DTRITON_ENABLE_STATS=ON
-DTRITON_ENABLE_METRICS=ON
-DTRITON_ENABLE_NVTX=ON
-DTRITON_ENABLE_GPU=ON
-DTRITON_MIN_COMPUTE_CAPABILITY:STRING="6.0"
MAYBE_UNUSED_VARIABLES
TRITON_CORE_HEADERS_ONLY
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()

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

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
68 changes: 68 additions & 0 deletions ports/nvidia-triton-core/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "nvidia-triton-core",
"version-date": "2023-01-23",
"description": "The core library and APIs implementing the Triton Inference Server.",
"homepage": "https://github.com/triton-inference-server/core",
"license": "BSD-3-Clause",
"dependencies": [
"boost-core",
"boost-functional",
"boost-interprocess",
{
"name": "libevhtp",
"platform": "!windows"
},
"nlohmann-json",
"nvidia-cnmem",
"nvidia-tools-extension-sdk",
"nvidia-triton-common",
{
"name": "opentelemetry-cpp",
"features": [
"prometheus"
]
},
"prometheus-cpp",
"protobuf",
"re2",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"aws-s3": {
"description": "Include S3 Filesystem support",
"dependencies": [
{
"name": "aws-sdk-cpp",
"features": [
"s3"
]
}
]
},
"azure-storage": {
"description": "Include Azure Storage Filesystem support",
"dependencies": [
"azure-storage-blobs-cpp",
"azure-storage-common-cpp"
]
},
"google-cloud-storage": {
"description": "Include Azure Storage Filesystem support",
"dependencies": [
{
"name": "google-cloud-cpp",
"features": [
"storage"
]
}
]
}
}
}
1 change: 1 addition & 0 deletions test/self-hosted-cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"nvidia-cnmem",
"nvidia-tools-extension-sdk",
"nvidia-triton-common",
"nvidia-triton-core",
{
"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 @@ -96,6 +96,10 @@
"baseline": "2023-01-23",
"port-version": 0
},
"nvidia-triton-core": {
"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-core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "b97522436a3db76cac892200ffd2f1ffe6da4672",
"version-date": "2023-01-23",
"port-version": 0
}
]
}
Loading