Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XPU] Update cmake options for xpu. #33450

Merged
merged 4 commits into from
Jun 15, 2021
Merged

Conversation

jiweibo
Copy link
Contributor

@jiweibo jiweibo commented Jun 9, 2021

PR types

Others

PR changes

Others

Describe

x86 + Paddle XPU

cmake .. -DWITH_PYTHON=ON \
         -DPYTHON_EXECUTABLE=`which python` \
         -DCMAKE_BUILD_TYPE=Release \
         -DON_INFER=ON \
         -DWITH_MKL=ON \
         -DWITH_XPU=ON \
         -DWITH_XPU_BKCL=ON \
         -DWITH_BDCENTOS=ON \
         -DWITH_GPU=OFF 

arm + Paddle xpu

cmake .. -DWITH_PYTHON=ON \
         -DPYTHON_EXECUTABLE=`which python` \
         -DCMAKE_BUILD_TYPE=Release \
         -DON_INFER=ON \
         -DWITH_MKL=OFF \
         -DWITH_XPU=ON \
         -DWITH_XPU_BKCL=ON \
         -DWITH_GPU=OFF \
         -DWITH_ARM=ON \
         -DWITH_AARCH64=ON

x86 + Paddle XPU + lite XPU

cmake .. -DWITH_PYTHON=ON \
         -DPYTHON_EXECUTABLE=`which python` \
         -DCMAKE_BUILD_TYPE=Release \
         -DON_INFER=ON \
         -DWITH_MKL=ON \
         -DWITH_XPU=ON \
         -DWITH_XPU_BKCL=ON \
         -DWITH_UBUNTU=ON \
         -DWITH_GPU=OFF \
         -DWITH_LITE=ON \
         -DLITE_WITH_XPU=ON \
         -DLITE_GIT_TAG=develop #release/v2.9 \
         -DCMAKE_CXX_FLAGS="-Wno-error -w"

arm + Paddle XPU + lite XPU

cmake .. -DWITH_PYTHON=ON \
         -DPYTHON_EXECUTABLE=`which python` \
         -DCMAKE_BUILD_TYPE=Release \
         -DON_INFER=ON \
         -DWITH_MKL=OFF \
         -DWITH_XPU=ON \
         -DWITH_GPU=OFF \
         -DWITH_LITE=ON \
         -DWITH_ARM=ON \
         -DWITH_AARCH64=ON \
         -DLITE_WITH_XPU=ON \
         -DLITE_GIT_TAG=develop #release/v2.9 \
         -DCMAKE_CXX_FLAGS="-Wno-error -w"

x86 + Paddle GPU + lite (XPU+GPU) (业务发包,不开启Python)

cmake .. -DWITH_PYTHON=OFF \
         -DCMAKE_BUILD_TYPE=Release \
         -DON_INFER=ON \
         -DWITH_MKL=ON \
         -DWITH_XPU=OFF \
         -DWITH_GPU=ON \
         -DCUDNN_ROOT=${CUDNN_ROOT} \
         -DWITH_TENSORRT=ON \
         -DWITH_LITE=ON \
         -DLITE_WITH_XPU=ON \
         -DLITE_GIT_TAG=develop #release/v2.9 \
         -DCMAKE_CXX_FLAGS="-Wno-error -w"

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 9, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

LINK_DIRECTORIES("${XPU_SDK_ROOT}/XTDK/shlib/")
LINK_DIRECTORIES("${XPU_SDK_ROOT}/XTDK/runtime/shlib/")
IF(WITH_AARCH64)
SET(XPU_SDK_ENV "kylin_aarch64")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是ARM平台的,但是你的说明中没有WITH_AARCH64.

[arm + Paddle XPU + lite XPU

cmake .. -DWITH_PYTHON=ON
-DPYTHON_EXECUTABLE=which python
-DCMAKE_BUILD_TYPE=Release
-DON_INFER=ON
-DWITH_MKL=OFF
-DWITH_XPU=ON
-DWITH_GPU=OFF
-DWITH_LITE=ON
-DLITE_WITH_XPU=ON
-DLITE_GIT_TAG=develop #release/v2.9
-DCMAKE_CXX_FLAGS="-Wno-error -w"
](url)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,忘加了。

@@ -7,7 +7,7 @@ SET(XPU_PROJECT "extern_xpu")
SET(XPU_API_LIB_NAME "libxpuapi.so")
SET(XPU_RT_LIB_NAME "libxpurt.so")

IF(WITH_AARCH64)
IF(WITH_AARCH64 OR WITH_ARM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITH_ARM是只有飞腾吗?其他ARM平台不一定支持

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@@ -147,6 +157,10 @@ message(STATUS "Paddle-lite BINARY_DIR: ${LITE_BINARY_DIR}")
message(STATUS "Paddle-lite SOURCE_DIR: ${LITE_SOURCE_DIR}")
include_directories(${LITE_SOURCE_DIR})
include_directories(${LITE_BINARY_DIR})
if(LITE_WITH_XPU)
include_directories(${LITE_BINARY_DIR}/third_party/install/xpu/xdnn/include/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个@知毅再确认下,在third_party/install/xpu目录下有xdnn、xre目录对吧

Copy link
Contributor

@QingshuChen QingshuChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiweibo jiweibo merged commit e47c3f0 into PaddlePaddle:develop Jun 15, 2021
@jiweibo jiweibo deleted the lite_xpu branch June 15, 2021 13:07
jiweibo added a commit to jiweibo/Paddle that referenced this pull request Jun 15, 2021
Superjomn pushed a commit that referenced this pull request Jun 18, 2021
* [XPU] Update cmake options for xpu. (#33450)

* patch in inference third_party
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants