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

Example CustomOp2 of torch.searchsorted #1418

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

jeromeku
Copy link

@jeromeku jeromeku commented Dec 9, 2023

torch.searchsorted CustomOp2 Implementation and Example

Per #1359, added cpu and cuda implementations of torch.searchsorted as a CustomOp2 as a candle-examples example.

  • provides same API as original torch implementation except for sort argument

Important

The tensor being searched MUST be sorted

  • includes a kernel_test folder for testing standalone cuda implementation
  • also includes jupyter notebook for generating test data from torch.searchsorted

See README.md as well as unittests in searchsorted.rs for documentation and usage examples.

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.

1 participant