diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh old mode 100755 new mode 100644 index e54039c85f0ac77b6175ccdc7b2f6607b3e165c3..73e385142960c8f2b80601a96aac63a7405cf250 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -2871,9 +2871,12 @@ function parallel_test() { mkdir -p ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build pip install hypothesis - if [ -d "${PADDLE_ROOT}/build/python/dist/" ]; then + if ls ${PADDLE_ROOT}/build/python/dist/*whl >/dev/null 2>&1; then pip install ${PADDLE_ROOT}/build/python/dist/*whl fi + if ls ${PADDLE_ROOT}/dist/*whl >/dev/null 2>&1; then + pip install ${PADDLE_ROOT}/dist/*whl + fi cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/testsuite.py ${PADDLE_ROOT}/build/python cp -r ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/white_list ${PADDLE_ROOT}/build/python ut_total_startTime_s=`date +%s` @@ -3465,6 +3468,7 @@ function check_coverage_build() { set -x } function run_setup(){ + rm -rf ${PADDLE_ROOT}/build # Build script will not fail if *.deb does not exist rm *.deb 2>/dev/null || true @@ -3666,7 +3670,7 @@ function main() { init case $CMD in build_only) - cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number} + run_setup ${PYTHON_ABI:-""} bdist_wheel ;; build_pr_dev) build_pr_and_develop diff --git a/setup.py b/setup.py index 3c7e5464a81a56c97e92128db8cf25680c64b3d8..e2e1e9dc2d235685a94ddcb0bb5eafffc4f3b9dd 100644 --- a/setup.py +++ b/setup.py @@ -857,13 +857,8 @@ def get_package_data_and_package_dir(): + '/cinn/runtime/cuda/cinn_cuda_runtime_source.cuh', libs_path, ) - shutil.copy( - env_dict.get("CINN_INCLUDE_DIR") + '/cinn/runtime/cuda/float16.h', - libs_path, - ) package_data['paddle.libs'] += ['libcinnapi.so'] package_data['paddle.libs'] += ['cinn_cuda_runtime_source.cuh'] - package_data['paddle.libs'] += ['float16.h'] if env_dict.get("CMAKE_BUILD_TYPE") == 'Release' and os.name != 'nt': command = ( "patchelf --set-rpath '$ORIGIN/' %s/" % libs_path @@ -948,11 +943,11 @@ def get_package_data_and_package_dir(): "command: %s" % command, ) shutil.copy(env_dict.get("XPU_API_LIB"), libs_path) - shutil.copy(env_dict.get("XPU_RT_LIB"), libs_path) - package_data['paddle.libs'] += [ - env_dict.get("XPU_API_LIB_NAME"), - env_dict.get("XPU_RT_LIB_NAME"), - ] + package_data['paddle.libs'] += [env_dict.get("XPU_API_LIB_NAME")] + xpu_rt_lib_list = glob.glob(env_dict.get("XPU_RT_LIB") + '*') + for xpu_rt_lib_file in xpu_rt_lib_list: + shutil.copy(xpu_rt_lib_file, libs_path) + package_data['paddle.libs'] += [os.path.basename(xpu_rt_lib_file)] if env_dict.get("WITH_XPU_BKCL") == 'ON': shutil.copy(env_dict.get("XPU_BKCL_LIB"), libs_path)