Skip to content

Implement parallel levenshtein distance on GPU#1057

Open
pkufool wants to merge 4 commits into
k2-fsa:masterfrom
pkufool:mbr
Open

Implement parallel levenshtein distance on GPU#1057
pkufool wants to merge 4 commits into
k2-fsa:masterfrom
pkufool:mbr

Conversation

@pkufool

@pkufool pkufool commented Sep 17, 2022

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

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

@pkufool

pkufool commented Sep 17, 2022

Copy link
Copy Markdown
Collaborator Author

synchronize

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

@csukuangfj

csukuangfj commented Sep 17, 2022

Copy link
Copy Markdown
Collaborator

@pkufool

pkufool commented Sep 18, 2022

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
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