Skip to content
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

Merged

Conversation

feifei-111
Copy link
Contributor

@feifei-111 feifei-111 commented Feb 19, 2024

PR types

Others

PR changes

Others

Description

update SIR export check, add _reconstruct for TensorDtypeVariable
PCard-66972

Copy link

paddle-bot bot commented Feb 19, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -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)
Copy link
Member

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 才行吧,不然应该组网会挂

另外这个没有加单测么?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

SigureMo
SigureMo previously approved these changes Feb 20, 2024
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow

SigureMo
SigureMo previously approved these changes Feb 20, 2024
@feifei-111 feifei-111 merged commit 4472890 into PaddlePaddle:develop Feb 21, 2024
30 checks passed
@feifei-111 feifei-111 deleted the support_paddle_dtype_reconstruct branch March 11, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants