aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/cudnn-frontend
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/cudnn-frontend')
-rw-r--r--vcpkg/ports/cudnn-frontend/portfile.cmake39
-rw-r--r--vcpkg/ports/cudnn-frontend/vcpkg.json19
2 files changed, 58 insertions, 0 deletions
diff --git a/vcpkg/ports/cudnn-frontend/portfile.cmake b/vcpkg/ports/cudnn-frontend/portfile.cmake
new file mode 100644
index 0000000..a6bc950
--- /dev/null
+++ b/vcpkg/ports/cudnn-frontend/portfile.cmake
@@ -0,0 +1,39 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO NVIDIA/cudnn-frontend
+ REF "v${VERSION}"
+ SHA512 75943654652bbde8dc90cf52b58078a8c8250940827cebfe96c36750bc41047d016a94f1201f9e4069cdac56e0804c2f5a534ca86d4dc0f0ba4e65a97792a7a7
+ HEAD_REF main
+)
+file(REMOVE_RECURSE "${SOURCE_PATH}/include/cudnn_frontend/thirdparty")
+
+set(VCPKG_BUILD_TYPE release) # header only, INTERFACE library
+
+vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT cuda_toolkit_root)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ "-DCMAKE_CUDA_COMPILER:FILEPATH=${NVCC}"
+ "-DCUDAToolkit_ROOT=${cuda_toolkit_root}"
+ -DCUDNN_FRONTEND_BUILD_PYTHON_BINDINGS=OFF
+ -DCUDNN_FRONTEND_BUILD_TESTS=OFF
+ -DCUDNN_FRONTEND_BUILD_SAMPLES=OFF
+ -DCUDNN_FRONTEND_SKIP_JSON_LIB=OFF # no macro definition
+ MAYBE_UNUSED_VARIABLES
+ CUDNN_FRONTEND_FETCH_PYBINDS_IN_CMAKE
+)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cudnn_frontend PACKAGE_NAME cudnn_frontend)
+
+# make the installed files to see nlohmann/json.hpp from vcpkg
+vcpkg_replace_string(
+ "${CURRENT_PACKAGES_DIR}/include/cudnn_frontend_utils.h"
+ "\"cudnn_frontend/thirdparty/nlohmann/json.hpp\"" "<nlohmann/json.hpp>"
+)
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug"
+ "${CURRENT_PACKAGES_DIR}/lib"
+)
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
diff --git a/vcpkg/ports/cudnn-frontend/vcpkg.json b/vcpkg/ports/cudnn-frontend/vcpkg.json
new file mode 100644
index 0000000..88ac319
--- /dev/null
+++ b/vcpkg/ports/cudnn-frontend/vcpkg.json
@@ -0,0 +1,19 @@
+{
+ "name": "cudnn-frontend",
+ "version-semver": "1.15.0",
+ "description": "cudnn_frontend provides a c++ wrapper for the cudnn backend API and samples on how to use it",
+ "homepage": "https://github.com/NVIDIA/cudnn-frontend",
+ "license": "MIT",
+ "dependencies": [
+ "cuda",
+ "nlohmann-json",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}