CUDA too many resources
dan9thsense opened this issue · 0 comments
I encountered this error:
RuntimeError: cuda runtime error (7) : too many resources requested for launch at jetson-reinforcement/build/pytorch/torch/lib/THCUNN/generic/SpatialUpSamplingBilinear.cu:63
Found a solution here: discussion and commit
I made the suggested changes to
jetson-reinforcement/build/pytorch/torch/lib/THCUNN/imcol2.h
but the error persisted. I modified the library
jetson-reinforcement/build/pytorch/torch/lib/THCUNN/SpatialUpSamplingBilinear.cu
with the suggested change from the discussion and also modified the generic
jetson-reinforcement/build/pytorch/torch/lib/THCUNN/generic/SpatialUpSamplingBilinear.cu
to limit the value of num_threads to 1024 on line 58.
Recompiled and that problem was fixed. However, now another pops up:
too many resources requested for launch at pytorch/torch/lib/THCUNN/generic/SpatialDilatedMaxPooling.cu:228
Do you have to patch all of the libraries to make it work?
I understand that this is a pytorch problem and should probably be addressed there, but the discussion is closed there, marked as resolved, the patch applied. I do need to use version 0.3.0 for other compatibility issues. I am wondering if perhaps I am doing something wrong in the build process.
Any help would be much appreciated.