未验证 提交 56257b3a 编写于 作者: H haosicheng 提交者: GitHub

Change custom op flag & fix path bug (#51799)

上级 3704471d
...@@ -73,6 +73,5 @@ env_dict={ ...@@ -73,6 +73,5 @@ env_dict={
'JIT_RELEASE_WHL':'@JIT_RELEASE_WHL@', 'JIT_RELEASE_WHL':'@JIT_RELEASE_WHL@',
'WITH_PSLIB':'@WITH_PSLIB@', 'WITH_PSLIB':'@WITH_PSLIB@',
'PYBIND_INCLUDE_DIR':'@PYBIND_INCLUDE_DIR@', 'PYBIND_INCLUDE_DIR':'@PYBIND_INCLUDE_DIR@',
'WITH_XDNN_API':'@WITH_XDNN_API@',
'WITH_PYTHON':'@WITH_PYTHON@' 'WITH_PYTHON':'@WITH_PYTHON@'
} }
...@@ -728,7 +728,7 @@ if '${WITH_GPU}' == 'ON' or '${WITH_ROCM}' == 'ON': ...@@ -728,7 +728,7 @@ if '${WITH_GPU}' == 'ON' or '${WITH_ROCM}' == 'ON':
# externalErrorMsg.pb for External Error message # externalErrorMsg.pb for External Error message
headers += list(find_files('*.pb', '${externalError_INCLUDE_DIR}')) headers += list(find_files('*.pb', '${externalError_INCLUDE_DIR}'))
if '${WITH_XDNN_API}' == 'ON': if '${WITH_XPU}' == 'ON':
headers += list(find_files('*.h', '@PADDLE_BINARY_DIR@/third_party/xpu/src/extern_xpu/xpu', recursive=True)) # xdnn api headers headers += list(find_files('*.h', '@PADDLE_BINARY_DIR@/third_party/xpu/src/extern_xpu/xpu', recursive=True)) # xdnn api headers
headers += list(find_files('*.h', '${PYBIND_INCLUDE_DIR}', True)) # pybind headers headers += list(find_files('*.h', '${PYBIND_INCLUDE_DIR}', True)) # pybind headers
......
...@@ -144,11 +144,11 @@ def get_header_install_dir(header): ...@@ -144,11 +144,11 @@ def get_header_install_dir(header):
else: else:
# third_party # third_party
install_dir = re.sub( install_dir = re.sub(
env_dict.get("THIRD_PARTY_PATH") + '/', 'third_party', header env_dict.get("THIRD_PARTY_PATH"), 'third_party', header
) )
patterns = [ patterns = [
'install/mkldnn/include', 'install/mkldnn/include/',
'pybind/src/extern_pybind/include', 'pybind/src/extern_pybind/include/',
'third_party/xpu/src/extern_xpu/xpu/include/', 'third_party/xpu/src/extern_xpu/xpu/include/',
] ]
for pattern in patterns: for pattern in patterns:
...@@ -1251,7 +1251,7 @@ def get_headers(): ...@@ -1251,7 +1251,7 @@ def get_headers():
find_files('*.pb', env_dict.get("externalError_INCLUDE_DIR")) find_files('*.pb', env_dict.get("externalError_INCLUDE_DIR"))
) )
if env_dict.get("WITH_XDNN_API") == 'ON': if env_dict.get("WITH_XPU") == 'ON':
headers += list( headers += list(
find_files( find_files(
'*.h', '*.h',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册