SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
756 stars 271 forks source link

Replace FFI to CUDAExtension for PyTorch 1.0.0 #89

Closed jinserk closed 5 years ago

jinserk commented 5 years ago

Hi @SeanNaren, I know that PyTorch 1.0.0 includes brand new CTCLoss, however, my old codes were not being trained well with it. I've discussed about the issue with @t-vi here, but it's still unclear that the bpc metric he mentioned could make the difference. So I modified the old ffi extension interface of this project to the new CppExtension and CUDAExtention of PyTorch 1.0.0 to keep it with my legacy codes. I also know that you are going to make this project deprecated. It's totally up to your decision to merge this PR. Thank you!

SeanNaren commented 5 years ago

oh this is awesome! I'll pull this in for sure, i'll give it a look over ASAP. But yes will be deprecating this for the built in loss function into pytorch, installing warp-ctc has been a history of pain for people :D

jinserk commented 5 years ago

It looks like the CI only checks cpu version pytorch, so I realize that the previous PR only works in gpu version. I've modified it to work on both of cpu and gpu versions. :D

jinserk commented 5 years ago

Hmm. the CI still failed. I guess the CI's pytorch is still the current stable 0.4.1 or so, not supporting the cpp extensions of pytorch.

SeanNaren commented 5 years ago

I'll keep this PR open till it becomes the stable GA release, that way I don't need to change the travis file to point to the nightly build!

jerinphilip commented 5 years ago

@jinserk: This works with 1.0.0, have you tested?

SeanNaren commented 5 years ago

Thanks Jinserk! I made a few changes/rebased down to one commit and got the tests working

jinserk commented 5 years ago

It's my big pleasure! Merry Christmas and Happy New Year to you!

On Fri, Dec 14, 2018 at 8:16 AM Sean Naren notifications@github.com wrote:

Thanks Jinserk! I made a few changes/rebased down to one commit and got the tests working

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SeanNaren/warp-ctc/pull/89#issuecomment-447338080, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyPtmKjasneDyz2e-GY7IlQc3KTTg42ks5u47LNgaJpZM4Xsigw .