|
15 | 15 | set(PADDLE_INFERENCE_INSTALL_DIR |
16 | 16 | "${CMAKE_BINARY_DIR}/paddle_inference_install_dir") |
17 | 17 |
|
18 | | -function(phi_header_path_compat TARGET_PATH) |
19 | | - message(STATUS "phi header path compat processing: ${TARGET_PATH}") |
| 18 | +function(header_path_compat TARGET_PATH) |
| 19 | + message(STATUS "header path compat processing: ${TARGET_PATH}") |
20 | 20 | file(GLOB HEADERS "${TARGET_PATH}/*" "*.h") |
21 | 21 | foreach(header ${HEADERS}) |
22 | 22 | if(${header} MATCHES ".*.h$") |
23 | 23 | file(READ ${header} HEADER_CONTENT) |
24 | 24 | string(REPLACE "paddle/fluid/platform/" "paddle/phi/" HEADER_CONTENT |
25 | 25 | "${HEADER_CONTENT}") |
| 26 | + string(REPLACE "paddle/pir/include/" "paddle/pir/" HEADER_CONTENT |
| 27 | + "${HEADER_CONTENT}") |
| 28 | + string(REPLACE "paddle/fluid/pir/drr/include/" "paddle/pir/drr/" |
| 29 | + HEADER_CONTENT "${HEADER_CONTENT}") |
| 30 | + string(REPLACE "paddle/fluid/pir/utils/" "paddle/pir/utils/" |
| 31 | + HEADER_CONTENT "${HEADER_CONTENT}") |
26 | 32 | file(WRITE ${header} "${HEADER_CONTENT}") |
27 | | - message(STATUS "phi header path compat processing complete: ${header}") |
| 33 | + message(STATUS "header path compat processing complete: ${header}") |
28 | 34 | endif() |
29 | 35 | endforeach() |
30 | 36 | endfunction() |
31 | 37 |
|
32 | | -phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle) |
33 | | -phi_header_path_compat( |
34 | | - ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi) |
35 | | -phi_header_path_compat( |
| 38 | +header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle) |
| 39 | +header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi) |
| 40 | +header_path_compat( |
36 | 41 | ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/api) |
37 | | -phi_header_path_compat( |
| 42 | +header_path_compat( |
38 | 43 | ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/api/ext) |
39 | | -phi_header_path_compat( |
| 44 | +header_path_compat( |
40 | 45 | ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/api/include) |
41 | | -phi_header_path_compat( |
| 46 | +header_path_compat( |
42 | 47 | ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/common) |
43 | | -phi_header_path_compat( |
| 48 | +header_path_compat( |
44 | 49 | ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/core) |
| 50 | +header_path_compat( |
| 51 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/core) |
| 52 | +header_path_compat( |
| 53 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/core/parser) |
| 54 | +header_path_compat( |
| 55 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/dialect/control_flow/ir |
| 56 | +) |
| 57 | +header_path_compat( |
| 58 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/dialect/shape/ir) |
| 59 | +header_path_compat( |
| 60 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/dialect/shape/utils) |
| 61 | +header_path_compat( |
| 62 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/drr) |
| 63 | +header_path_compat( |
| 64 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/pass) |
| 65 | +header_path_compat( |
| 66 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/pattern_rewrite) |
| 67 | +header_path_compat( |
| 68 | + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/pir/utils) |
45 | 69 |
|
46 | 70 | # NOTE(liuyuanle): In inference lib, no need include paddle/utils/pybind.h, so we delete this. |
47 | 71 | file(READ ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/extension.h |
|
0 commit comments