Thank you @smth . However, it can not find this file of <THC/THCApply.cuh> in extend C function .(Is this due to the torch.utils.ffi.create_extension,? it seems only TH/TH.h and THC/THC.h is explicity declare in this function ).
And TH/TH.h have the #include "THTensorDimApply.h" so it can use TH_TENSOR_APPLY3() marco. THCApply.cuh is not in THC/THC.h.
Is there a good way to “include” this header ?