Closed Chenchenwenyu closed 2 years ago
Hi @ChennolongerCai ,
The line is a call to the C++ extension from pytorch/CUDA/softpool_cuda.cpp
: https://github.com/alexandrosstergiou/SoftPool/blob/2d2ec6dca10b7683ffd41061a27910d67816bfa5/pytorch/CUDA/softpool_cuda.cpp#L206
This basically binds the C++ softpool2d_forward_cuda
function to Python and makes it callable (from the Python script).
If you want to delve deeper, you can also have a look at the PyTorch official (and rather extensive) guide for working with/writing custom C++/CUDA extensions (link).
Hi,thanks for your great idea!
I have a question in " softpool_cuda.forward_2d(input.contiguous(), kernel, stride, output) ",I just don't know what this line of code means ?What do you want to do with this line of code?
Looking forward to your reply,thanks!