-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model takes very long to load and tutorial script fails #7
Comments
I think you can easily verify that it does not take more than 1 minute on colab, so this should be an environment issue. What looks problematic in your environment is that your version of pytorch is not built with the compute compatibility for P100. In that case when some ops are run for the first time nvidia-driver will spend some time compiling them. Running it the second time on the same machine should be faster. Running the code you showed also needs to download 178MB of model for the first time. This is fast on colab, but may be slow on your machine.
It is saying that opencv cannot read the input image you gave. You may need to check your input path or the opencv installation. |
The version of cudatoolkit is 10.1.168, while pytorch1.3 is build with cuda 10.1.243. Maybe this is the problem live in. |
Similar reports have been seen in #27 and pytorch/pytorch#537. You need to find a version of pytorch whose "NVCC architecture flags" include the compute compatibility of your GPU. |
Has been fixed in pytorch according to #27 |
Thank you very much for the help! I can confirm that the Conda version of PyTorch from last week wasn't properly compiled to support my GPU. This has been fixed and the newest PyTorch version downloaded via Conda works error-free. |
If you do not know the root cause of the problem / bug, and wish someone to help you, please
include:
When I try to run the code from the Detectron2 Tutorial Collab, the model takes an extremely long time to load and then crashes with a CUDA Error / Segmentation fault.
To Reproduce
DefaultPredictor(cfg)
takes an extremely long time (>15 minutes). Specifically, the commandbuild_model(cfg)
within the class__init__()
takes this long to complete.top
lists the python process as taking up 100% of CPU power and approx. 3.5% of memory while the GPU takes only approximately 500MB out of available 16GB). It appears that PyTorch is attempting to execute everything on the CPU.However, I've checked all CUDA versions and everything points to CUDA 10.1, so I don't think this is a version mismatch:
All required versions as per the install page are fulfilled:
Expected behavior
PyTorch appears to run primarily on the CPU instead of the GPU. I expect it to run primarily on the GPU. As I've made no edits to the code, I also expect it to run error-free.
Environment
The text was updated successfully, but these errors were encountered: