-
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
Sparse Kernel for Lookup Table Grad Operator #4904
Conversation
paddle/framework/operator.h
Outdated
@@ -457,6 +457,16 @@ class RuntimeInferShapeContext : public InferShapeContext { | |||
return true; | |||
} | |||
|
|||
const Variable* InputVar(const std::string& name) const { |
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.
why should add two special interfaces
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.
@jacquesqiao Since we will set var type in compile-time. And our programDesc will pass to Executor to create variable. So we should set variable in Executor. Like GetMutable<Tensor>/GetMutable<SelectedRows>/GetMutable<LoDTensor>
.
At run-time, we can just get tensor to set dims and get dims.
Currently, we do not implement variable type inference in Executor. And variable type is set to LoDTensor by default at run-time infershape stage.
I add these two interfaces to get a variable at run-time infershape stage and set variable type manaully. This will be fixed if our whole compile-time framework is done.
No description provided.