diff --git a/cmake/paddlepaddle.cmake b/cmake/paddlepaddle.cmake index 1421f52c0828bbe0917eccb5fecf72e1f3057961..aac2791b4c16ab275d78d98ccb9abcb3d2eaa33c 100644 --- a/cmake/paddlepaddle.cmake +++ b/cmake/paddlepaddle.cmake @@ -136,8 +136,10 @@ LINK_DIRECTORIES(${PADDLE_INSTALL_DIR}/third_party/install/mklml/lib) SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}" "${PADDLE_INSTALL_DIR}/third_party/install/mkldnn/lib") LINK_DIRECTORIES(${PADDLE_INSTALL_DIR}/third_party/install/mkldnn/lib) -ADD_LIBRARY(openblas STATIC IMPORTED GLOBAL) -SET_PROPERTY(TARGET openblas PROPERTY IMPORTED_LOCATION ${PADDLE_INSTALL_DIR}/third_party/install/openblas/lib/libopenblas.a) +if (NOT WITH_MKLML) + ADD_LIBRARY(openblas STATIC IMPORTED GLOBAL) + SET_PROPERTY(TARGET openblas PROPERTY IMPORTED_LOCATION ${PADDLE_INSTALL_DIR}/third_party/install/openblas/lib/libopenblas.a) +endif() ADD_LIBRARY(paddle_inference STATIC IMPORTED GLOBAL) SET_PROPERTY(TARGET paddle_inference PROPERTY IMPORTED_LOCATION ${PADDLE_INSTALL_DIR}/lib/libpaddle_inference.a) diff --git a/python/examples/xpu/ernie/ernie_client.py b/python/examples/xpu/ernie/ernie_client.py index d5f2d25d599ae9440e939826f41b624814c6c8f0..b02c9d0aa48cbea04f122f46a5e3a8679eb259d1 100644 --- a/python/examples/xpu/ernie/ernie_client.py +++ b/python/examples/xpu/ernie/ernie_client.py @@ -23,7 +23,7 @@ args = benchmark_args() reader = ChineseErnieReader({"max_seq_len": 128}) fetch = ["save_infer_model/scale_0"] -endpoint_list = ['127.0.0.1:12000'] +endpoint_list = ['127.0.0.1:7704'] client = Client() client.load_client_config(args.model) client.connect(endpoint_list)