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

Sparse Kernel for Lookup Table Grad Operator #4904

Closed
wants to merge 16 commits into from

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Oct 18, 2017

No description provided.

@QiJune QiJune changed the title Sparse Kernel for Lookup Grad Operator Sparse Kernel for Lookup Table Grad Operator Oct 18, 2017
@@ -457,6 +457,16 @@ class RuntimeInferShapeContext : public InferShapeContext {
return true;
}

const Variable* InputVar(const std::string& name) const {
Copy link
Member

@jacquesqiao jacquesqiao Oct 19, 2017

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

Copy link
Member Author

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.

@QiJune QiJune closed this Oct 27, 2017
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