-
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] change FullWithTensor
input shape
to mutable attribute
#63332
[PIR] change FullWithTensor
input shape
to mutable attribute
#63332
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
shape
to mutable attribute
shape
to mutable attributeFullWithTensor
input shape
to mutable attribute
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
paddle/phi/api/yaml/op_compat.yaml
Outdated
- op : full_with_tensor | ||
int_array: | ||
shape : | ||
data_type : int |
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.
这里可以使用int64吗?
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.
我改一下~
FullWithTensor
input shape
to mutable attributeFullWithTensor
input shape
to mutable attribute
PR Category
Execute Infrastructure
PR Types
Bug fixes
Description
将
FullWithTensor
的输入shape
修改为可变 attribute,以使其可以包含ParseValueShape
以从输入 shape 解析出来 Full我们目前只有对
IntArray
才会在 InferMeta 时生成ParseValueShape
,才会从[101, Value()]
这种 case 中正确解析出 shape,但FullWithTensor
的输入 shape 是Tensor
,也就没有这个解析操作,InferMeta 后 shape 就变成了[-1, -1]
,但实际上[101, -1]
才是合理的而
Full
的 shape 是完全静态化的,不支持可变 attribute,因此这种情况是不能转成Full
的,而将FullWithTensor
将shape
变成可变 attribute 后,只是功能的扩展,是兼容之前的情况的,只是输入顺序修改了下,value 需要在 shape 之前cc @HydrogenSulfate
PCard-66972