-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[NNAdapter][KunlunxinXTCL] add kunlunxin_xtcl doc and opt tool #9603
Conversation
test=xtcl test=develop
Thanks for your contribution! |
test=xtcl test=develop
docs/demo_guides/kunlunxin_xtcl.md
Outdated
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否不建议用户直接手动设置sdk_root 呢?默认如果为空则自动从云上下载吧,默认不加这个参数,然后加一个备注如果想手动指定xtcl sdk ,可以使用这个参数。
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个包含空格的参数是否无法在run.sh脚本里面设置呢?
There was a problem hiding this comment.
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",我再补充下
There was a problem hiding this comment.
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脚本吗?
There was a problem hiding this comment.
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\""
test=xtcl test=develop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
test=xtcl
test=develop