未验证 提交 91cdd295 编写于 作者: R risemeup1 提交者: GitHub

support cinn ci (#48931)

* support cinn ci

* modify .whl dir

* support CINN

* support cinn

* support kunlun200 and kunlun200test

* support cinn

* fix tests in kunlun200

* fix bug that can't find libxpu.so.1

* test
上级 98c17a68
...@@ -2871,9 +2871,12 @@ function parallel_test() { ...@@ -2871,9 +2871,12 @@ function parallel_test() {
mkdir -p ${PADDLE_ROOT}/build mkdir -p ${PADDLE_ROOT}/build
cd ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build
pip install hypothesis 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 pip install ${PADDLE_ROOT}/build/python/dist/*whl
fi 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 ${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 cp -r ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/white_list ${PADDLE_ROOT}/build/python
ut_total_startTime_s=`date +%s` ut_total_startTime_s=`date +%s`
...@@ -3465,6 +3468,7 @@ function check_coverage_build() { ...@@ -3465,6 +3468,7 @@ function check_coverage_build() {
set -x set -x
} }
function run_setup(){ function run_setup(){
rm -rf ${PADDLE_ROOT}/build rm -rf ${PADDLE_ROOT}/build
# Build script will not fail if *.deb does not exist # Build script will not fail if *.deb does not exist
rm *.deb 2>/dev/null || true rm *.deb 2>/dev/null || true
...@@ -3666,7 +3670,7 @@ function main() { ...@@ -3666,7 +3670,7 @@ function main() {
init init
case $CMD in case $CMD in
build_only) build_only)
cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number} run_setup ${PYTHON_ABI:-""} bdist_wheel
;; ;;
build_pr_dev) build_pr_dev)
build_pr_and_develop build_pr_and_develop
......
...@@ -857,13 +857,8 @@ def get_package_data_and_package_dir(): ...@@ -857,13 +857,8 @@ def get_package_data_and_package_dir():
+ '/cinn/runtime/cuda/cinn_cuda_runtime_source.cuh', + '/cinn/runtime/cuda/cinn_cuda_runtime_source.cuh',
libs_path, 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'] += ['libcinnapi.so']
package_data['paddle.libs'] += ['cinn_cuda_runtime_source.cuh'] 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': if env_dict.get("CMAKE_BUILD_TYPE") == 'Release' and os.name != 'nt':
command = ( command = (
"patchelf --set-rpath '$ORIGIN/' %s/" % libs_path "patchelf --set-rpath '$ORIGIN/' %s/" % libs_path
...@@ -948,11 +943,11 @@ def get_package_data_and_package_dir(): ...@@ -948,11 +943,11 @@ def get_package_data_and_package_dir():
"command: %s" % command, "command: %s" % command,
) )
shutil.copy(env_dict.get("XPU_API_LIB"), libs_path) 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")]
package_data['paddle.libs'] += [ xpu_rt_lib_list = glob.glob(env_dict.get("XPU_RT_LIB") + '*')
env_dict.get("XPU_API_LIB_NAME"), for xpu_rt_lib_file in xpu_rt_lib_list:
env_dict.get("XPU_RT_LIB_NAME"), 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': if env_dict.get("WITH_XPU_BKCL") == 'ON':
shutil.copy(env_dict.get("XPU_BKCL_LIB"), libs_path) shutil.copy(env_dict.get("XPU_BKCL_LIB"), libs_path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册