I tried to run the custom c++ extension code as mentioned in the post (https://pytorch.org/tutorials/advanced/cpp_extension.html 1) but the time taken for python and cpp versions are entirely different for backward propagation especially.
(test1) gputest@gputest-OptiPlex-745:~/PycharmProjects/test1/extension-cpp-master$ python benchmark.py py
Forward: 524.282/560.827 us | Backward 844.955/890.770 us
(test1) gputest@gputest-OptiPlex-745:~/PycharmProjects/test1/extension-cpp-master$ python benchmark.py cpp
Forward: 473.022/497.065 us | Backward 1243.830/1299.400 us
Because he mentioned that backward propagation time should be similar for both. But here I got different values will that would be an issue?
Thanks