-
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
[SOT] update SIR export check, add _reconstruct for TensorDtypeVariable #61822
[SOT] update SIR export check, add _reconstruct for TensorDtypeVariable #61822
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -284,6 +284,10 @@ def get_py_type(self): | |||
return paddle.pir.core.DataType | |||
return super().get_py_type() | |||
|
|||
def _reconstruct(self, codegen: PyCodeGen): | |||
# dtype of paddle.Tensor is hashable, we can just load it as const var | |||
codegen.gen_load_const(self.value) |
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.
这里在 PIR 下应该也需要上面 get_py_value 和 get_py_type 一样的检查并 vartype_to_datatype 才行吧,不然应该组网会挂
另外这个没有加单测么?
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.
Done
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 types
Others
PR changes
Others
Description
update SIR export check, add _reconstruct for TensorDtypeVariable
PCard-66972