Will old C++ extension codes work in PyTorch 0.4?

In 0.4, a new way to do extension was introduced and I am wondering:

  1. Will old extension codes still work? If will, is it necessary or not to migrate? If not, how to fix them?

  2. 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> …

  3. Here’s my code, any advise ?

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

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!

In 0.4 you can try, but going forward, probably not: https://github.com/pytorch/pytorch/pull/6913

Best regards

Thomas