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

[NNAdapter][KunlunxinXTCL] add kunlunxin_xtcl doc and opt tool #9603

Merged
merged 3 commits into from
Oct 28, 2022

Conversation

daydayup-lh
Copy link
Contributor

test=xtcl
test=develop

@paddle-bot
Copy link

paddle-bot bot commented Oct 27, 2022

Thanks for your contribution!

# arm 环境下需要设置环境变量 CC 和 CXX,分别指定 C 编译器和 C++ 编译器的路径
$ export CC=<path_to_your_c_compiler>
$ export CXX=<path_to_your_c++_compiler>
$ ./lite/tools/build_linux.sh --arch=armv8 --with_extra=ON --with_log=ON --with_exception=ON --with_nnadapter=ON --nnadapter_with_kunlunxin_xtcl=ON --nnadapter_kunlunxin_xtcl_sdk_root=<path-to-kunlunxin-xtcl-sdk-root> full_publish
Copy link
Collaborator

Choose a reason for hiding this comment

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

是否不建议用户直接手动设置sdk_root 呢?默认如果为空则自动从云上下载吧,默认不加这个参数,然后加一个备注如果想手动指定xtcl sdk ,可以使用这个参数。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,我修改下


- KUNLUNXIN_XTCL_DEVICE_TARGET

指定昆仑芯 XPU 的不同类型的推理卡。例如KUNLUNXIN_XTCL_DEVICE_TARGET=xpu -libs=xdnn -device-type=xpu1或者KUNLUNXIN_XTCL_DEVICE_TARGET=xpu -libs=xdnn -device-type=xpu2
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个包含空格的参数是否无法在run.sh脚本里面设置呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

在shell脚本中可以这样设置环境变量,export KUNLUNXIN_XTCL_DEVICE_TARGET="xpu -libs=xdnn -device-type=xpu2",我再补充下

Copy link
Collaborator

Choose a reason for hiding this comment

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

在shell脚本中可以这样设置环境变量,export KUNLUNXIN_XTCL_DEVICE_TARGET="xpu -libs=xdnn -device-type=xpu2",我再补充下

嗯,run.sh 这个脚本应该没问题,有试过run_with_ssh.sh脚本吗?

Copy link
Contributor Author

@daydayup-lh daydayup-lh Oct 28, 2022

Choose a reason for hiding this comment

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

在run_with_ssh.sh中,和run.sh中脚本设置类似,不过需要给引号加上转义字符\,例如:EXPORT_ENVIRONMENT_VARIABLES="$EXPORT_ENVIRONMENT_VARIABLES; export KUNLUNXIN_XTCL_DEVICE_TARGET=\"xpu -libs=xdnn -device-type=xpu1\""

@PaddlePaddle PaddlePaddle locked as off-topic and limited conversation to collaborators Oct 28, 2022
@PaddlePaddle PaddlePaddle unlocked this conversation Oct 28, 2022
Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

@hong19860320 hong19860320 merged commit fe94397 into PaddlePaddle:release/v2.12 Oct 28, 2022
@daydayup-lh daydayup-lh deleted the lihuan/add_doc branch October 28, 2022 12:56
daydayup-lh added a commit to daydayup-lh/Paddle-Lite that referenced this pull request Nov 2, 2022
fe94397 [NNAdapter][KunlunxinXTCL] add kunlunxin_xtcl doc and opt tool (PaddlePaddle#9603)
7016ebf [NNAdapter][KunlunxinXTCL]  Update kunlunxin_xtcl doc (PaddlePaddle#9625)
f8b7153 [NNAdapter][KunlunxinXTCL] Add kunlunxin_xtcl doc index (PaddlePaddle#9628)
test=xtcl
test=develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants