diff --git a/cmake/paddlepaddle.cmake b/cmake/paddlepaddle.cmake index 1d6faa4aa4fac4366ba1e47811ba5e4db80c0a3d..ccccdddeb838f3c6429c1dc2cd4a01371963183d 100644 --- a/cmake/paddlepaddle.cmake +++ b/cmake/paddlepaddle.cmake @@ -88,7 +88,8 @@ if (WITH_GPU OR WITH_MKLML) INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PADDLE_DOWNLOAD_DIR}/paddle/include ${PADDLE_INSTALL_DIR}/include && ${CMAKE_COMMAND} -E copy_directory ${PADDLE_DOWNLOAD_DIR}/paddle/lib ${PADDLE_INSTALL_DIR}/lib && - ${CMAKE_COMMAND} -E copy_directory ${PADDLE_DOWNLOAD_DIR}/third_party ${PADDLE_INSTALL_DIR}/third_party + ${CMAKE_COMMAND} -E copy_directory ${PADDLE_DOWNLOAD_DIR}/third_party ${PADDLE_INSTALL_DIR}/third_party && + ${CMAKE_COMMAND} -E copy ${PADDLE_INSTALL_DIR}/third_party/install/mkldnn/lib/libdnnl.so.1 ${PADDLE_INSTALL_DIR}/third_party/install/mkldnn/lib/libdnnl.so ) else() ExternalProject_Add( diff --git a/core/general-server/CMakeLists.txt b/core/general-server/CMakeLists.txt index 27ceddc044de31914bbe60a7f125c226cc7a728c..48f154b0ebf0600c84990daa089feaea0eb85446 100644 --- a/core/general-server/CMakeLists.txt +++ b/core/general-server/CMakeLists.txt @@ -41,7 +41,7 @@ endif() if(WITH_MKL OR WITH_GPU) if (WITH_TRT) - target_link_libraries(serving -liomp5 -lmklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz -lbz2) + target_link_libraries(serving -liomp5 -lmklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz -lbz2 -ldnnl) else() target_link_libraries(serving -liomp5 -lmklml_intel -lmkldnn -lpthread -lcrypto -lm -lrt -lssl -ldl -lz -lbz2) endif() @@ -62,6 +62,7 @@ install(FILES ${CMAKE_BINARY_DIR}/third_party/install/Paddle/third_party/install/mklml/lib/libmklml_intel.so ${CMAKE_BINARY_DIR}/third_party/install/Paddle/third_party/install/mklml/lib/libiomp5.so ${CMAKE_BINARY_DIR}/third_party/install/Paddle/third_party/install/mkldnn/lib/libmkldnn.so.0 + ${CMAKE_BINARY_DIR}/third_party/install/Paddle/third_party/install/mkldnn/lib/libdnnl.so.1 DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/demo/serving/bin) endif() diff --git a/python/paddle_serving_server/serve.py b/python/paddle_serving_server/serve.py index 33c652c34b38e011661cba29782e196ac8da413f..63354f08ab71c9267388e2b45b3e6f931b6d0720 100644 --- a/python/paddle_serving_server/serve.py +++ b/python/paddle_serving_server/serve.py @@ -25,6 +25,7 @@ import time from multiprocessing import Process from .web_service import WebService, port_is_available from flask import Flask, request +import sys if sys.version_info.major == 2: from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer elif sys.version_info.major == 3: diff --git a/python/paddle_serving_server_gpu/serve.py b/python/paddle_serving_server_gpu/serve.py index 739a74846a1a681e4f3d14894257bba8c1448ca9..88a2909955be1b4342f3d6037655995aed0d7a4c 100644 --- a/python/paddle_serving_server_gpu/serve.py +++ b/python/paddle_serving_server_gpu/serve.py @@ -25,6 +25,7 @@ import time from multiprocessing import Pool, Process from paddle_serving_server_gpu import serve_args from flask import Flask, request +import sys if sys.version_info.major == 2: from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer elif sys.version_info.major == 3: