dusty-nv / jetson-reinforcement

Deep reinforcement learning GPU libraries for NVIDIA Jetson TX1/TX2 with PyTorch, OpenAI Gym, and Gazebo robotics simulator.
MIT License
880 stars 224 forks source link

CUDA too many resources #28

Open dan9thsense opened 6 years ago

dan9thsense commented 6 years ago

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.