-
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
add dist attribute for mutable attribute. #62897
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
d7d077b
to
2aabf38
Compare
67f0741
to
15b1c85
Compare
pir::StrAttribute::get(IrContext::Instance(), name); | ||
for (auto &op : block) { | ||
if (op.isa<pir::ShadowOutputOp>()) { | ||
if (op.attribute("output_name") == name_attr) { |
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.
we need to assert the name is unique
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.
very thanks, I will fix the problem in next pr.
|
||
# Step 1.2: pir backward | ||
if mode != "predict" and self._loss: | ||
loss = dist_program.get_output_value_by_name(self._loss_names[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.
what ablout multiple losses?
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.
The current PIR backward api only supports single losses situation. Therefore, only the first loss is processed here.
I will add annotations here in the next pr.
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
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
* add dist attribute for mutable attribute. * support backward for distribute pir.
PR types
New features
PR changes
Others
Description
Other
Pcard-67164