-
Notifications
You must be signed in to change notification settings - Fork 749
[XPU] Fix illegal instruction error when running Intel P800-compiled RDMA libs on Hygon P800 #7935
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,11 @@ set(CMAKE_CXX_EXTENSIONS ON) | |
| set(CMAKE_BUILD_TYPE Release) | ||
|
|
||
| set(CMAKE_CXX_COMPILER g++) | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Ofast -ffast-math -funroll-loops -march=native -std=c++11") | ||
| if(DEVICE_TYPE STREQUAL "xpu" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Ofast -ffast-math -funroll-loops -march=x86-64-v3 -std=c++11") | ||
| else() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ 疑问
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P800 基于 ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:xpu-ubuntu2204-x86_64-gcc123-py310 镜像,默认 gcc 版本 12.3。 |
||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Ofast -ffast-math -funroll-loops -march=native -std=c++11") | ||
| endif() | ||
| add_compile_options("-std=c++11") | ||
|
|
||
| find_library(IBVERBS_LIBRARY ibverbs) | ||
|
|
||
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.
❓ 疑问 条件仅覆盖
DEVICE_TYPE=xpu,其他设备类型(如dcu)若在 Intel 机器上编译、在海光机器上运行,同样会触发 illegal instruction 错误。是否有意只修复 XPU 场景?如果是,建议在注释中说明原因;如果其他设备类型也有跨平台部署需求,可考虑将条件扩展为:
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.
目前仅 XPU 的硬件环境比较复杂,其它硬件如果需要可自行增加