-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nvidia-triton-core] Create a new port (#162)
* [nvidia-triton-core] create a new port * [nvidia-triton-core] update baseline * ci: test nvidia-triton-core
- Loading branch information
Showing
6 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} |