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

[Op][Index] Take, StridedSlice #85

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

MasterJH5574
Copy link
Member

As listed in #62, this PR introduces the indexing operator take and strided_slice.

Note that DataAPI only has take. However, as slicing is a common operation for arrays/tensors in NumPy and PyTorch, we also bring strided_slice for those cases. Though a strided_slice operation is a combination of multiple takes along different axes, having strided_slice eases the effort of fusing multiple contiguous takes and is thus worth being introduced.

Copy link
Contributor

@tqchen tqchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor comment

src/relax/op/tensor/index.cc Outdated Show resolved Hide resolved
@tqchen tqchen merged commit d64b575 into mlc-ai:structinfo Jan 5, 2023
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