RuntimeError: cuda runtime error (999)

created at 11-09-2021 views: 22

Problem Description

When I ran the improved yolov4 program, I accidentally bumped into the top row of "PC" on the keyboard and one of the three left and right buttons on the keyboard, and the program directly reported an error:

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1595629403081/work/aten/src/THC/THCGeneral.cpp line=47 error=999 : unknown error
Traceback (most recent call last):
  File "/home/lidan/PycharmProjects/yolov4/B_mobilenet-yolov4-lite_378/train.py", line 280, in <module>
    net = net.cuda()
  File "/home/lidan/.conda/envs/ultralytics_yolov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 458, in cuda
    return self._apply(lambda t: t.cuda(device))
  File "/home/lidan/.conda/envs/ultralytics_yolov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 354, in _apply
    module._apply(fn)
  File "/home/lidan/.conda/envs/ultralytics_yolov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 354, in _apply
    module._apply(fn)
  File "/home/lidan/.conda/envs/ultralytics_yolov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 354, in _apply
    module._apply(fn)
  [Previous line repeated 3 more times]
  File "/home/lidan/.conda/envs/ultralytics_yolov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 376, in _apply
    param_applied = fn(param)
  File "/home/lidan/.conda/envs/ultralytics_yolov3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 458, in <lambda>
    return self._apply(lambda t: t.cuda(device))
  File "/home/lidan/.conda/envs/ultralytics_yolov3/lib/python3.7/site-packages/torch/cuda/__init__.py", line 190, in _lazy_init
    torch._C._cuda_init()
RuntimeError: cuda runtime error (999) : unknown error at /opt/conda/conda-bld/pytorch_1595629403081/work/aten/src/THC/THCGeneral.cpp:47

In addition, some other pages of the computer are not working well, for example, the web page cannot be displayed completely when opened. . .

Solution

Restart the computer, everything is back to normal

created at:11-09-2021
edited at: 11-09-2021: