CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[XPU]add xpu3_op_list #57683
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]add xpu3_op_list #57683
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Sorry to inform you that 2c32b60's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
paddle/fluid/pybind/place.cc
Outdated
return platform::get_xpu_version(place.device) > | ||
phi::backends::xpu::XPUVersion::XPU1; | ||
// Only xpu2 supports bfloat16 | ||
return platform::get_xpu_version(place.device) == |
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.
KL3也支持BF16
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.
已修改
|
||
XPUOpMap& get_kl3_ops() { | ||
// KL3支持的op,通过op_name, data_type, place来索引 | ||
static XPUOpMap s_xpu3_kernels{ |
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.
这些op xdnn中都有KL3的api实现?
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.
这些是通过跑paddle xpu的单测,然后剔除未实现的op之后剩下的
@@ -195,9 +195,12 @@ XPUVersion get_xpu_version(int dev_id) { | |||
if (v == K100 || v == K200) { | |||
VLOG(1) << "KUNLUN device " << dev_id << " is XPU1\n"; | |||
return XPU1; | |||
} else { | |||
} else if (v < KL3_BEGIN) { |
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.
KL3_BEGIN是什么?和驱动对应吗?
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.
在这里面有:
xre-ubuntu_x86_64/include/xpu/defs.h
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.
是跟驱动对应的设备型号,大于KL3_BEGIN的都是kl3的设备
{"batch_norm_grad", | ||
XPUKernelSet({phi::DataType::FLOAT32, phi::DataType::FLOAT16})}, | ||
{"batch_norm", | ||
XPUKernelSet({phi::DataType::FLOAT32, phi::DataType::FLOAT16})}, |
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.
PR总提交超过1000行了,可以拆两个PR提交。
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.
好的,我先提交oplist的一部分
* add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list
* add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list
* add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list * add xpu3_op_list
PR types
Others
PR changes
Others
Description
添加xpu3_op_list,将xpu3的算子列表与xpu2分离开来。去除了单测中显示unimplemented的算子。