-
Notifications
You must be signed in to change notification settings - Fork 3k
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] Add matrix slicing python API #6184
Conversation
To trigger regression tests:
|
ef6c65b
to
304e003
Compare
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.
I'd suggest you to try Github copilot to improve your wording and coding efficiency.
304e003
to
13b6f1a
Compare
Now we have two API designs, one is row-column-select API, and another is index-range-select API.
index-range-select API:
Or even we can combine them all like:
@frozenbugs do you have some comments? |
The index/range should just be tensor, right? And it is quite common to use dim in dgl Sparse API to indicate row wise and column wise, see (https://docs.dgl.ai/en/1.1.x/api/python/dgl.sparse_v0.html), so def select(dim, Tensor) should be good. |
d296dac
to
bf98516
Compare
Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
@frozenbugs CI told me "Unused argument 'dim' (unused-argument)", I wonder how to pass it without changing API. |
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.
Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
Description
Define the python interfaces for matrix slicing operators, includes: rowwise_select(ids), columnwise_select(ids), rowwise_select(start, end), columnwise_select(start, end)
Checklist
Please feel free to remove inapplicable items for your PR.
Changes