-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[PIR] Add parse kernel key interface #59124
[PIR] Add parse kernel key interface #59124
Conversation
你的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.
现在能通过相关单测吗?如果可以的话,建议在 test/white_list/pir_op_test_white_list
添加下 test_unique_op,把单测加入到监控里
KernelKeyTuple UniqueOpParseKernelKey(pir::Operation* op) { | ||
DenseTensorType x_type = | ||
op->operand_source(0).type().dyn_cast<paddle::dialect::DenseTensorType>(); | ||
phi::DataType dtype = TransToPhiDataType(x_type.dtype()); | ||
pir::BoolAttribute is_sort = op->attribute<pir::BoolAttribute>("is_sorted"); | ||
phi::Backend backend = phi::Backend::UNDEFINED; | ||
if (is_sort.data()) { | ||
backend = phi::Backend::CPU; | ||
} | ||
return {dtype, backend}; | ||
} | ||
|
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.
这个是不是放到单独的.cc文件里面比较好
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.
暂时仅有这一个函数,后续有需求再单独放在一个文件中
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 for parse_utils.py
* add interface * add interface * add code * fix * fix * fix * fix * fix
PR types
New features
PR changes
Others
Description
添加 ParseKenrelKey interface,用于实现对特殊算子的 kernel 选择逻辑
Pcard-67164