diff --git a/cmake/paddle_inference.cmake b/cmake/paddle_inference.cmake index 02c066d072..5af3bb637d 100755 --- a/cmake/paddle_inference.cmake +++ b/cmake/paddle_inference.cmake @@ -268,10 +268,12 @@ function(set_paddle_encrypt_auth_compatible_policy LIBRARY_NAME) endfunction() # Compatible policy for 2.4.x/2.5.x and latest dev. -string(REGEX MATCH "0.0.0" PADDLEINFERENCE_USE_DEV ${PADDLEINFERENCE_VERSION}) -string(REGEX MATCH "2.4|post24|post2.4" PADDLEINFERENCE_USE_2_4_x ${PADDLEINFERENCE_VERSION}) -string(REGEX MATCH "2.5|post25|post2.5" PADDLEINFERENCE_USE_2_5_x ${PADDLEINFERENCE_VERSION}) - +if (NOT WITH_KUNLUNXIN) + string(REGEX MATCH "0.0.0" PADDLEINFERENCE_USE_DEV ${PADDLEINFERENCE_VERSION}) + string(REGEX MATCH "2.4|post24|post2.4" PADDLEINFERENCE_USE_2_4_x ${PADDLEINFERENCE_VERSION}) + string(REGEX MATCH "2.5|post25|post2.5" PADDLEINFERENCE_USE_2_5_x ${PADDLEINFERENCE_VERSION}) +endif() + if(PADDLEINFERENCE_USE_DEV) set(PADDLEINFERENCE_API_COMPAT_DEV ON CACHE BOOL "" FORCE) endif() @@ -298,7 +300,7 @@ if(PADDLEINFERENCE_API_COMPAT_DEV) endif() # Compatible policy for custom paddle ops -if(PADDLEINFERENCE_API_COMPAT_2_5_x) +if(PADDLEINFERENCE_API_COMPAT_2_5_x AND (NOT WITH_KUNLUNXIN)) # no c++ standard policy conflicts vs c++ 11 # TODO: support custom ops for latest dev set(PADDLEINFERENCE_API_CUSTOM_OP ON CACHE BOOL "" FORCE) @@ -310,7 +312,7 @@ if(PADDLEINFERENCE_API_COMPAT_2_5_x) endif() function(set_paddle_custom_ops_compatible_policy) - if(PADDLEINFERENCE_API_CUSTOM_OP) + if(PADDLEINFERENCE_API_CUSTOM_OP AND (NOT WITH_KUNLUNXIN)) if(NOT MSVC) # TODO: add non c++ 14 policy for latest dev if(NOT PADDLEINFERENCE_API_COMPAT_2_5_x) diff --git a/examples/vision/classification/paddleclas/serving/models/preprocess/1/inference_cls.yaml b/examples/vision/classification/paddleclas/serving/models/preprocess/1/inference_cls.yaml deleted file mode 100644 index d9181278cc..0000000000 --- a/examples/vision/classification/paddleclas/serving/models/preprocess/1/inference_cls.yaml +++ /dev/null @@ -1,35 +0,0 @@ -Global: - infer_imgs: "./images/ImageNet/ILSVRC2012_val_00000010.jpeg" - inference_model_dir: "./models" - batch_size: 1 - use_gpu: True - enable_mkldnn: True - cpu_num_threads: 10 - enable_benchmark: True - use_fp16: False - ir_optim: True - use_tensorrt: False - gpu_mem: 8000 - enable_profile: False - -PreProcess: - transform_ops: - - ResizeImage: - resize_short: 256 - - CropImage: - size: 224 - - NormalizeImage: - scale: 0.00392157 - mean: [0.485, 0.456, 0.406] - std: [0.229, 0.224, 0.225] - order: '' - channel_num: 3 - - ToCHWImage: - -PostProcess: - main_indicator: Topk - Topk: - topk: 5 - class_id_map_file: "../ppcls/utils/imagenet1k_label_list.txt" - SavePreLabel: - save_dir: ./pre_label/ diff --git a/serving/scripts/build_fd_xpu.sh b/serving/scripts/build_fd_xpu.sh index 4573128d4b..473a0584cc 100755 --- a/serving/scripts/build_fd_xpu.sh +++ b/serving/scripts/build_fd_xpu.sh @@ -16,7 +16,7 @@ echo "start build FD XPU library" -docker run -i --rm --name build_fd_xpu \ +docker run -i --rm --name build_fd_xpu_108 \ -v `pwd`/..:/workspace/fastdeploy \ -e "http_proxy=${http_proxy}" \ -e "https_proxy=${https_proxy}" \ diff --git a/serving/scripts/build_fd_xpu_encrypt_auth.sh b/serving/scripts/build_fd_xpu_encrypt_auth.sh index 824147b7fb..0fbb139f7c 100755 --- a/serving/scripts/build_fd_xpu_encrypt_auth.sh +++ b/serving/scripts/build_fd_xpu_encrypt_auth.sh @@ -16,7 +16,7 @@ echo "start build FD XPU AUTH library" -docker run -i --rm --name build_fd_xpu_auth_dev \ +docker run -i --rm --name build_fd_xpu_auth_108_dev \ -v `pwd`/..:/workspace/fastdeploy \ -e "http_proxy=${http_proxy}" \ -e "https_proxy=${https_proxy}" \ @@ -41,8 +41,9 @@ docker run -i --rm --name build_fd_xpu_auth_dev \ python setup.py build; python setup.py bdist_wheel; cd /workspace/fastdeploy; - wget ${PADDLEINFERENCE_URL} && tar -zxvf ${PADDLEINFERENCE_URL##*/} - mv ${PADDLEINFERENCE_URL##*/} paddle_inference + wget -q ${PADDLEINFERENCE_URL} && tar -zxvf ${PADDLEINFERENCE_URL##*/}; + tmp_dir=${PADDLEINFERENCE_URL##*/} + mv ${tmp_dir%.*} paddle_inference PADDLEINFERENCE_DIRECTORY=${PWD}/paddle_inference rm -rf build; mkdir build; cd build; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PWD}/fastdeploy_install -DWITH_KUNLUNXIN=ON -DENABLE_PADDLE_BACKEND=ON -DPADDLEINFERENCE_DIRECTORY=${PADDLEINFERENCE_DIRECTORY} -DENABLE_BENCHMARK=ON -DLIBRARY_NAME=fastdeploy_runtime;