-
Notifications
You must be signed in to change notification settings - Fork 5.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
[SCU][Paddle TensorRT No.58] Add pd_op.unbind converter #70066
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
|
||
if (op->HasAttribute("axis")) { | ||
int axis = op->attribute<pir::Int32Attribute>("axis").data(); | ||
if (axis == 0) { |
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.
?我如果第一维度不是动态shape,二三维度是动态shape呢
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.
已修改,但是我发现如果碰到动态shape,报错在marker pass之前,测试时不等进入这里的限制条件判断就报错崩溃了
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.
那这里就删除吧,convert先按照旧ir的写,如果还是出错,加一个TODO
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.
已经提交按旧ir写的converter的commit了,还是出错。请问TODO是加在测试还是marker
axis = paddle_op.attrs().get("axis", 0) | ||
if axis < 0: | ||
axis += input_rank | ||
axis_tensor = add_1D_constant_layer(network, axis) |
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.
以下代码和旧ir逻辑不同,请参考旧ir-trt
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.
好的
…rker test due to no path to get the false result.
shuffle_layer = network.add_shuffle(sliced_tensor) | ||
shuffle_layer.set_input(1, newDims_tensor) | ||
reshaped_tensor = shuffle_layer.get_output(0) | ||
output_tensors.append(reshaped_tensor) |
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.
这里应该是直接返回reshaped_tensor吧,为什么要返回list
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文档以及示例用法,unbind api应该返回一个list,list里面是一个个切割得到的tensor
Sorry to inform you that 1840c33's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
PR Category
Inference
PR Types
New features
Description
新增了
pd_op.unbind
Marker 和 Converter