From 447f3b665b581bb5b4b32e30f54ba25c221fba15 Mon Sep 17 00:00:00 2001 From: Tatiana Likhomanenko Date: Thu, 15 Apr 2021 16:51:13 -0700 Subject: [PATCH] Set all apps to be off for the build (#533) Summary: Pull Request resolved: https://github.com/facebookresearch/flashlight/pull/533 - set all apps to OFF for build - add docs on objdet build - resolve issue https://github.com/facebookresearch/flashlight/issues/528 Reviewed By: jacobkahn Differential Revision: D27644353 fbshipit-source-id: 070de6fd69adf8c03aa24f7097aa3dbfea9a632b --- CMakeLists.txt | 11 +++-------- README.md | 29 +++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10320916..46ef27bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,9 +55,6 @@ option(FL_BUILD_CORE "Build flashlight core" ON) cmake_dependent_option(FL_BUILD_CONTRIB "Build and link additional flashlight contrib assets." ON "FL_BUILD_CORE" OFF) -cmake_dependent_option(FL_BUILD_APPS - "Build flashlight apps" ON - "FL_BUILD_CORE;FL_BUILD_CONTRIB;FL_BUILD_LIBRARIES" OFF) # Flashlight backend set(FL_BACKEND "CUDA" CACHE STRING "Backend with which to build flashlight") @@ -275,11 +272,9 @@ if (FL_BUILD_CORE) endif() # if FL_BUILD_CORE # --------------------------- Apps --------------------------- -if (FL_BUILD_APPS) - message(STATUS "Will build Flashlight applications.") - set(FL_APPS_DIR "${FL_ROOT_DIR}/app") - include(${FL_APPS_DIR}/CMakeLists.txt) -endif() + +set(FL_APPS_DIR "${FL_ROOT_DIR}/app") +include(${FL_APPS_DIR}/CMakeLists.txt) # --------------------------- Cleanup --------------------------- setup_install_targets(INSTALL_TARGETS ${INSTALLABLE_TARGETS}) diff --git a/README.md b/README.md index 2a27be2c..ff7d5a0b 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ tensor library. Native support in C++ and simple extensibility makes Flashlight a powerful research framework that's *hackable to its core* and enables fast iteration on new experimental setups and algorithms without sacrificing performance. In a single repository, Flashlight provides [apps](https://github.com/facebookresearch/flashlight/tree/master/flashlight/app) for research across multiple domains: - [Automatic speech recognition](https://github.com/facebookresearch/flashlight/tree/master/flashlight/app/asr) (the [wav2letter](https://github.com/facebookresearch/wav2letter/) project) — [Documentation](flashlight/app/asr) | [Tutorial](flashlight/app/asr/tutorial) - [Image classification](flashlight/app/imgclass) +- [Object detection](flashlight/app/objdet) - [Language modeling](flashlight/app/lm) @@ -217,7 +218,7 @@ cmake .. -DCMAKE_BUILD_TYPE=Release -DFL_BACKEND=[backend] [...build options] make -j$(nproc) make install ``` -Setting the `MKLROOT` environment variable (`export MKLROOT=/opt/intel/oneapi/mkl/latest` or `export MKLROOT=/opt/intel/mkl` on most Linux-based systems) can help CMake find Intel MKL if not initially found. +Setting the `MKLROOT` environment variable (`export MKLROOT=/opt/intel/oneapi/mkl/latest` or `export MKLROOT=/opt/intel/mkl` on most Linux-based systems) can help CMake find Intel MKL if not initially found. To build a smaller subset of Flashlight features/apps, see the [build options](#build-options) below for a complete list of options. @@ -279,6 +280,11 @@ Dependencies marked with `†` are installable via `vcpkg`. See the [instruction Any - + + app: objdet + Any + - + app: lm Any @@ -342,33 +348,39 @@ The Flashlight CMake build accepts the following build options (prefixed with `- Build contrib APIs subject to breaking changes. - FL_BUILD_APPS + FL_BUILD_ALL_APPS ON, OFF - ON - Build apps (see below). + OFF + Defines default value for every app (see below). FL_BUILD_APP_ASR ON, OFF - ON + FL_BUILD_ALL_APPS Build the automatic speech recognition app. FL_BUILD_APP_IMGCLASS ON, OFF - ON + FL_BUILD_ALL_APPS Build the image classification app. + + + FL_BUILD_APP_OBJDET + ON, OFF + FL_BUILD_ALL_APPS + Build automatic speech recognition app tools. FL_BUILD_APP_LM ON, OFF - ON + FL_BUILD_ALL_APPS Build the language modeling app. FL_BUILD_APP_ASR_TOOLS ON, OFF - ON + FL_BUILD_APP_ASR Build automatic speech recognition app tools. @@ -410,6 +422,7 @@ Flashlight is most-easily linked to using CMake. Flashlight exports the followin - `flashlight::flashlight` — contains flashlight libraries as well as the flashlight core autograd and neural network library. - `flashlight::flashlight-app-asr` — contains the automatic speech recognition app along with the flashlight core and flashlight libraries. - `flashlight::flashlight-app-imgclass` — contains the image classification app along with the flashlight core and flashlight libraries. +- `flashlight::flashlight-app-objdet` — contains the object detection app along with the flashlight core and flashlight libraries. - `flashlight::flashlight-app-lm` — contains the language modeling app along with the flashlight core and flashlight libraries. Given a simple `project.cpp` file that includes and links to Flashlight: