-
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
[NewIR]Add builtin.split op #56431
[NewIR]Add builtin.split op #56431
Conversation
…e/Paddle into vjp_for_new_ir
… vjp_for_new_ir
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -498,7 +525,8 @@ void BuildScope(const ir::Block& block, | |||
if (op_name == "pd.feed" || op_name == "pd.fetch" || | |||
op_name == "builtin.combine" || op_name == "builtin.set_parameter" || | |||
op_name == "builtin.get_parameter" || op_name == "builtin.slice" || | |||
op_name == "pd.data" || op_name == "pd.shadow_output") { | |||
op_name == "builtin.split" || op_name == "pd.data" || | |||
op_name == "pd.shadow_output") { |
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 中的 static 匿名函数也可以
OperationArgument &argument, | ||
const ir::OpResult &input) { | ||
argument.inputs = {input}; | ||
std::vector<ir::Type> outputs_types; |
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.
outputs_types 的作用是什么,是不是可以删除
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.
参考combine op 创建输出type
|
||
if (new_in.type().isa<ir::VectorType>()) { | ||
auto vec_types = new_in.type().dyn_cast<ir::VectorType>().data(); | ||
out_place = |
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.
TODO:out_place 可能是不同的place,这里不要用同一个 place 去构造下面的 AllocatedDenseTensorType
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.
* [prim][newir] add basic framework for primitive * support desctensor in new ir * add vjp interface * support vjp in new ir * support vjp in new ir * polish vjp interface * fix stop_gradients set * fix vjp dispatch * add comment * add vjp test for new ir * add test for tanh vjp * [prim][newir] add basic framework for primitive * support desctensor in new ir * support vjp in new ir * support vjp in new ir * polish vjp interface * fix stop_gradients set * fix vjp dispatch * add comment * add vjp test for new ir * add test for tanh vjp * add eager and static backend for warp lower level api * support call_vjp pybind * polish code and add test for vjp * remove useless code * polish code * remove useless code * support mean vjp * backward origin code * add test for mean vjp and support has_vjp function * fix call_vjp * polish code * add attrs and dtype interface * add primitive ops set for backend * fix compile bugs * fix some bugs * fix windows bugs * add vjp test for tanh_ * fix inference CI * fix inference ci * modify fluid cmake * origin test of tanh and mean passed * fix conflict * modify stop_gradient * remove useless deps * add cmake * modify block.ops * modify test * fix conflict * reply review comments * reply review comments * pulish code * fix comment * fix test * polish code * modify backward stop_gradients * modify static_backend.cc * refactor grad_op * support add and add_inplace vjp * remove useless code * remove useless code * remove cout * modify add_n * modify add_n with add_vjp test * modify add_n with add_vjp test * fix conflict and concat call_vjp * modify backward test * Add more gen api * add builtin split op --------- Co-authored-by: cxxly <chenxx_id@163.com> Co-authored-by: Charles-hit <wanghao107@baidu.com> Co-authored-by: zhangbo9674 <zhangbo54@baidu.com> Co-authored-by: YuanRisheng <yuanrisheng@baidu.com> Co-authored-by: 0x45f <wangzhen45@baidu.com>
PR types
others
PR changes
others
Description
pcard-67164
增加builtin_split op 相关定义及处理函数