jxgu1016
(JxGu)
April 25, 2018, 3:21am
1
In 0.4, a new way to do extension was introduced and I am wondering:
Will old extension codes still work? If will, is it necessary or not to migrate? If not, how to fix them?
The latest example is using <torch/torch.h>, so are we still using the same C API, like <TH/TH.h> and <THC/THC.h> …
Here’s my code , any advise ?
tom
(Thomas V)
April 25, 2018, 6:37am
2
I’d probably look at porting it over.
In my experience, the new API is a lot cleaner - e.g. using templates instead of macro expansion to achieve what the old generic mechanism did.
Best regards
Thomas
jxgu1016
(JxGu)
April 25, 2018, 6:55am
3
But I am still wondering can my codes compile and work in v0.4? And how PyTorch deals with the old C API? Deleted or kept?
THX!
tom
(Thomas V)
April 25, 2018, 8:47pm
4
In 0.4 you can try, but going forward, probably not: https://github.com/pytorch/pytorch/pull/6913
Best regards
Thomas