pytorch / extension-cpp

C++ extensions in PyTorch
1.02k stars 214 forks source link

Cannot Unpack, Too Many Items #75

Open stevenwalton opened 2 years ago

stevenwalton commented 2 years ago

I think there's a mistake in the cpp section and I want to ask before I "fix" it. It doesn't technically cause an error, but it makes it harder to switch the python file back and forth. So the cpp version of the python file has this line https://github.com/pytorch/extension-cpp/blob/master/cpp/lltm.py#L23 with 5 outputs which correctly corresponds to the 5 outputs from the cpp file https://github.com/pytorch/extension-cpp/blob/master/cpp/lltm.cpp#L84 But looking at the cuda version, there are 6 outputs. Python: https://github.com/pytorch/extension-cpp/blob/master/cuda/lltm.py#L25, cu: https://github.com/pytorch/extension-cpp/blob/master/cuda/lltm_cuda_kernel.cu#L173

If this is confirmed I can also edit the tutorial text as I have an open PR there fixing some other language.