[Bug] Vision and text compile source file add .cu file on CMakeLists.txt (#1188)

* vision and text CMake add .cu file

* recover .cu file

* recover .cu file

* vision and text CMake add .cu file

* vision and text CMake add .cu file

* vision and text CMake add .cu file

* Update yolo_preprocess.cu
This commit is contained in:
heliqi
2023-01-31 11:39:12 +08:00
committed by GitHub
parent 54ceb93670
commit 1427d5d29a
3 changed files with 8 additions and 8 deletions

View File

@@ -157,10 +157,6 @@ add_definitions(-DFASTDEPLOY_LIB)
configure_file(${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/core/config.h.in ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/core/config.h)
configure_file(${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/pybind/main.cc.in ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/pybind/main.cc)
file(GLOB_RECURSE ALL_DEPLOY_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/*.cc)
if(WITH_GPU)
file(GLOB_RECURSE DEPLOY_CUDA_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/*.cu)
list(APPEND ALL_DEPLOY_SRCS ${DEPLOY_CUDA_SRCS})
endif()
file(GLOB_RECURSE DEPLOY_ORT_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/runtime/backends/ort/*.cc)
file(GLOB_RECURSE DEPLOY_PADDLE_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/runtime/backends/paddle/*.cc)
file(GLOB_RECURSE DEPLOY_POROS_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/runtime/backends/poros/*.cc)
@@ -174,6 +170,14 @@ file(GLOB_RECURSE DEPLOY_ENCRYPTION_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}
file(GLOB_RECURSE DEPLOY_PIPELINE_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/pipeline/*.cc)
file(GLOB_RECURSE DEPLOY_TEXT_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/text/*.cc)
file(GLOB_RECURSE DEPLOY_PYBIND_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/pybind/*.cc ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/*_pybind.cc)
if(WITH_GPU)
file(GLOB_RECURSE DEPLOY_CUDA_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/*.cu)
list(APPEND ALL_DEPLOY_SRCS ${DEPLOY_CUDA_SRCS})
file(GLOB_RECURSE DEPLOY_VISION_CUDA_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/vision/*.cu)
list(APPEND DEPLOY_VISION_SRCS ${DEPLOY_VISION_CUDA_SRCS})
file(GLOB_RECURSE DEPLOY_TEXT_CUDA_SRCS ${PROJECT_SOURCE_DIR}/${CSRCS_DIR_NAME}/fastdeploy/text/*.cu)
list(APPEND DEPLOY_TEXT_SRCS ${DEPLOY_TEXT_CUDA_SRCS})
endif()
list(REMOVE_ITEM ALL_DEPLOY_SRCS ${DEPLOY_ORT_SRCS} ${DEPLOY_PADDLE_SRCS} ${DEPLOY_POROS_SRCS} ${DEPLOY_TRT_SRCS} ${DEPLOY_OPENVINO_SRCS} ${DEPLOY_LITE_SRCS} ${DEPLOY_VISION_SRCS} ${DEPLOY_TEXT_SRCS} ${DEPLOY_PIPELINE_SRCS} ${DEPLOY_RKNPU2_SRCS} ${DEPLOY_SOPHGO_SRCS} ${DEPLOY_ENCRYPTION_SRCS})
set(DEPEND_LIBS "")

View File

@@ -13,7 +13,6 @@
// limitations under the License.
#ifdef WITH_GPU
#ifdef ENABLE_VISION
#include "fastdeploy/vision/common/processors/normalize_and_permute.h"
namespace fastdeploy {
@@ -81,4 +80,3 @@ bool NormalizeAndPermute::ImplByCvCuda(Mat* mat) { return ImplByCuda(mat); }
} // namespace vision
} // namespace fastdeploy
#endif
#endif

View File

@@ -22,7 +22,6 @@
// \author Qi Liu, Xinyu Wang
#ifdef WITH_GPU
#ifdef ENABLE_VISION
#include <opencv2/opencv.hpp>
#include "fastdeploy/vision/utils/cuda_utils.h"
@@ -146,4 +145,3 @@ void CudaYoloPreprocess(uint8_t* src, int src_width, int src_height, float* dst,
} // namespace vision
} // namespace fastdeploy
#endif
#endif