-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Impl optimizer #4734
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
Impl optimizer #4734
Conversation
… into impl-optimizer
reyoung
left a comment
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.
Excellent!
| grad_record.op_idx_ = static_cast<int>(op_index); | ||
| return false; /* not break */ | ||
| }); | ||
| if (need_infer_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.
Cool.
|
|
||
| def var(self, name): | ||
| if name not in self.vars: | ||
| raise Exception("var %s not in this block" % name) |
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.
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
| global_block = self.program.global_block() | ||
| return Parameter(global_block, *args, **kwargs) | ||
| param = Parameter(global_block, *args, **kwargs) | ||
| self.program.parameters.append(param.name) |
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.
parameters is not needed because it is recorded in vars_
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
reyoung
left a comment
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
Project: #4679
Issue: #4735