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

Need a new class to represent some certain interface of Table used in lookup remote table #9841

Closed
Yancey1989 opened this issue Apr 11, 2018 · 1 comment
Assignees

Comments

@Yancey1989
Copy link
Contributor

For the feature lookup remote table, we use the variable type SelectedRows to represent a Table currently. But sometimes the code is not certainly enough. Maybe we need a new class named Table(or othes) that inherit SelectedRows and implement some certain interface, the pseudo code as following:

class Table : public framework::SelectedRows {
bool HasKey(int64_t key)
bool Resize(framework::ddim shape); // resize value and rows size
Tensor Get(int64_t key)
bool Set(int64_t key, Tensor value);
...
}
@Yancey1989
Copy link
Contributor Author

As the offline discussion, maybe we can SelectedRows always, and implement some new interfaces to operate the sparse table. And on the other hand, we can auto-reallocate the memory while calling the Set interface.

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

No branches or pull requests

3 participants