未验证 提交 4aac90ef 编写于 作者: Z Zhen Wang 提交者: GitHub

Fix some bugs about the usage of cinn lib. (#43586)

* Fix some bugs about the usage of cinn lib.

* Fix some unit test errors.
上级 94249f5e
......@@ -370,7 +370,7 @@ if is_compiled_with_cinn():
runtime_include_dir = os.path.join(package_dir, "libs")
cuh_file = os.path.join(runtime_include_dir, "cinn_cuda_runtime_source.cuh")
if os.path.exists(cuh_file):
os.environ['runtime_include_dir'] = runtime_include_dir
os.environ.setdefault('runtime_include_dir', runtime_include_dir)
disable_static()
......
......@@ -502,6 +502,10 @@ if '${WITH_CINN}' == 'ON':
shutil.copy('${CINN_INCLUDE_DIR}/cinn/runtime/cuda/cinn_cuda_runtime_source.cuh', libs_path)
package_data['paddle.libs']+=['libcinnapi.so']
package_data['paddle.libs']+=['cinn_cuda_runtime_source.cuh']
if '${CMAKE_BUILD_TYPE}' == 'Release' and os.name != 'nt':
command = "patchelf --set-rpath '$ORIGIN/' %s/${CINN_LIB_NAME}" % libs_path
if os.system(command) != 0:
raise Exception("patch %s/${CINN_LIB_NAME} failed, command: %s" % (libs_path, command))
if '${WITH_PSLIB}' == 'ON':
shutil.copy('${PSLIB_LIB}', libs_path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册