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

Implement parallel levenshtein distance on GPU #1057

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pkufool
Copy link
Collaborator

@pkufool pkufool commented Sep 17, 2022

This PR implements the levenshtein distance on GPU, it can run in batches and has boundary support. From a simple benchmark as follows, you can get quite a lot speedup comparing with CPU.

image

@csukuangfj
Copy link
Collaborator

For benchmarking with CUDA, I think you need to synchronize with the calls.

@pkufool
Copy link
Collaborator Author

pkufool commented Sep 17, 2022

synchronize

Oh, do you have any examples or documentations about it?

@csukuangfj
Copy link
Collaborator

csukuangfj commented Sep 17, 2022

@pkufool
Copy link
Collaborator Author

pkufool commented Sep 18, 2022

I update the benchmark results.

https://auro-227.medium.com/timing-your-pytorch-code-fragments-e1a556e81f2

I can't open this page, and find another discussions here https://discuss.pytorch.org/t/how-to-measure-time-in-pytorch/26964/5

@csukuangfj
Copy link
Collaborator

Could you use some kind of warmup and print the average time?

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