early-access version 2853
This commit is contained in:
33
externals/vcpkg/ports/flashlight-cpu/fix-dependencies.patch
vendored
Executable file
33
externals/vcpkg/ports/flashlight-cpu/fix-dependencies.patch
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9d9eacb..b530743 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -183,7 +183,7 @@ if (FL_BUILD_CORE)
|
||||
|
||||
# If cereal is found in a user-defined location, use it rather than
|
||||
# downloading from source
|
||||
- find_package(cereal)
|
||||
+ find_package(cereal CONFIG REQUIRED)
|
||||
if (NOT TARGET cereal AND NOT cereal_FOUND AND FL_BUILD_STANDALONE)
|
||||
message(STATUS "cereal NOT found. Will download from source")
|
||||
set(CEREAL_INSTALL_PATH ${FL_INSTALL_INC_DIR}/cereal)
|
||||
@@ -206,7 +206,6 @@ if (FL_BUILD_CORE)
|
||||
message(STATUS "Found cereal")
|
||||
target_link_libraries(flashlight PRIVATE cereal)
|
||||
endif()
|
||||
- setup_install_find_module(${CMAKE_MODULE_PATH}/Findcereal.cmake)
|
||||
|
||||
# -------------------- Locate Backend-specific Dependencies --------------------
|
||||
# TODO: rather than conditionally searching for backend-specific dependencies,
|
||||
diff --git a/cmake/flashlightConfig.cmake.in b/cmake/flashlightConfig.cmake.in
|
||||
index 00f9442..f265b8f 100644
|
||||
--- a/cmake/flashlightConfig.cmake.in
|
||||
+++ b/cmake/flashlightConfig.cmake.in
|
||||
@@ -36,6 +36,7 @@ if (@FL_BUILD_LIBRARIES@)
|
||||
endif()
|
||||
# Core dependencies
|
||||
if (@FL_BUILD_CORE@)
|
||||
+ find_dependency(cereal CONFIG)
|
||||
find_dependency(ArrayFire 3.7.1)
|
||||
endif()
|
||||
if (@FL_BUILD_DISTRIBUTED@)
|
||||
88
externals/vcpkg/ports/flashlight-cpu/portfile.cmake
vendored
Executable file
88
externals/vcpkg/ports/flashlight-cpu/portfile.cmake
vendored
Executable file
@@ -0,0 +1,88 @@
|
||||
if (EXISTS "${CURRENT_INSTALLED_DIR}/share/flashlight")
|
||||
message(FATAL_ERROR "Only one of flashlight-cpu and flashlight-cuda"
|
||||
"can be installed at once. Uninstall and try again:"
|
||||
"\n vcpkg remove flashlight-cuda\n")
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO flashlight/flashlight
|
||||
REF 626914e79073c5547513de649af706f7e2b796ad # 0.3 branch tip
|
||||
SHA512 a22057cfa4cfe7acd95cbc5445a30870cce3cdde89066d1d75f40be0d73b069a49e89b226fe5337488cfe5618dd25958679c0636a3e4008312f01606328becfa
|
||||
HEAD_REF master
|
||||
PATCHES fix-dependencies.patch
|
||||
)
|
||||
|
||||
################################### Build ###################################
|
||||
# Default flags
|
||||
set(FL_DEFAULT_VCPKG_CMAKE_FLAGS
|
||||
-DFL_BUILD_TESTS=OFF
|
||||
-DFL_BUILD_EXAMPLES=OFF
|
||||
-DFL_BACKEND=CPU # this port is CPU-backend only
|
||||
-DFL_BUILD_STANDALONE=OFF
|
||||
)
|
||||
|
||||
# Determine which components to build via specified feature
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
lib FL_BUILD_LIBRARIES
|
||||
fl FL_BUILD_CORE
|
||||
asr FL_BUILD_APP_ASR
|
||||
imgclass FL_BUILD_APP_IMGCLASS
|
||||
lm FL_BUILD_APP_LM
|
||||
objdet FL_BUILD_APP_OBJDET
|
||||
)
|
||||
|
||||
# Build and install
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FL_DEFAULT_VCPKG_CMAKE_FLAGS}
|
||||
${FEATURE_OPTIONS}
|
||||
OPTIONS_DEBUG
|
||||
-DFL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/debug/share/flashlight
|
||||
OPTIONS_RELEASE
|
||||
-DFL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share/flashlight
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/flashlight TARGET_PATH share/flashlight)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# Binaries/tools
|
||||
set(FLASHLIGHT_TOOLS "")
|
||||
if ("imgclass" IN_LIST FEATURES)
|
||||
list(APPEND FLASHLIGHT_TOOLS
|
||||
fl_img_imagenet_resnet34
|
||||
fl_img_imagenet_eval
|
||||
fl_img_imagenet_vit
|
||||
)
|
||||
endif()
|
||||
if ("asr" IN_LIST FEATURES)
|
||||
list(APPEND FLASHLIGHT_TOOLS
|
||||
fl_asr_train
|
||||
fl_asr_test
|
||||
fl_asr_decode
|
||||
fl_asr_align
|
||||
fl_asr_voice_activity_detection_ctc
|
||||
fl_asr_arch_benchmark
|
||||
)
|
||||
endif()
|
||||
if ("lm" IN_LIST FEATURES)
|
||||
list(APPEND FLASHLIGHT_TOOLS
|
||||
fl_lm_dictionary_builder
|
||||
fl_lm_train
|
||||
fl_lm_test
|
||||
)
|
||||
endif()
|
||||
list(LENGTH FLASHLIGHT_TOOLS NUM_TOOLS)
|
||||
if (NUM_TOOLS GREATER 0)
|
||||
vcpkg_copy_tools(TOOL_NAMES ${FLASHLIGHT_TOOLS} AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
# Copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
103
externals/vcpkg/ports/flashlight-cpu/vcpkg.json
vendored
Executable file
103
externals/vcpkg/ports/flashlight-cpu/vcpkg.json
vendored
Executable file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"name": "flashlight-cpu",
|
||||
"version": "0.3",
|
||||
"port-version": 3,
|
||||
"description": "A C++ standalone library for machine learning. CPU backend.",
|
||||
"homepage": "https://github.com/facebookresearch/flashlight",
|
||||
"license": "MIT",
|
||||
"supports": "!(windows | osx)",
|
||||
"default-features": [
|
||||
"fl"
|
||||
],
|
||||
"features": {
|
||||
"asr": {
|
||||
"description": "flashlight asr app",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "flashlight-cpu",
|
||||
"features": [
|
||||
"fl",
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"gflags",
|
||||
{
|
||||
"name": "libsndfile",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"external-libs"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"fl": {
|
||||
"description": "flashlight core autograd and neural net library",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "arrayfire",
|
||||
"features": [
|
||||
"cpu"
|
||||
]
|
||||
},
|
||||
"cereal",
|
||||
{
|
||||
"name": "gloo",
|
||||
"features": [
|
||||
"mpi"
|
||||
]
|
||||
},
|
||||
"onednn",
|
||||
"openmpi",
|
||||
"stb"
|
||||
]
|
||||
},
|
||||
"imgclass": {
|
||||
"description": "flashlight image classification app",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "flashlight-cpu",
|
||||
"features": [
|
||||
"fl",
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"gflags"
|
||||
]
|
||||
},
|
||||
"lib": {
|
||||
"description": "flashlight libraries",
|
||||
"dependencies": [
|
||||
"fftw3",
|
||||
"intel-mkl",
|
||||
"kenlm"
|
||||
]
|
||||
},
|
||||
"lm": {
|
||||
"description": "flashlight lm app",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "flashlight-cpu",
|
||||
"features": [
|
||||
"fl",
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"gflags"
|
||||
]
|
||||
},
|
||||
"objdet": {
|
||||
"description": "flashlight object detection app",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "flashlight-cpu",
|
||||
"features": [
|
||||
"fl",
|
||||
"imgclass",
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"gflags"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user