theAIGuysCode / yolov4-deepsort

Object tracking implemented with YOLOv4, DeepSort, and TensorFlow.
GNU General Public License v3.0
1.33k stars 750 forks source link

InternalError: CUDA runtime implicit initialization on GPU:0 failed. Status: device kernel image is invalid #72

Open ypxingxing opened 3 years ago

ypxingxing commented 3 years ago

When I run this line of code "python save_model.py --model yolov4 ": report an error “File "/home/xhay/anaconda3/envs/yolov4-gpu/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 300, in _constant_eager_impl t = convert_to_eager_tensor(value, ctx, dtype) File "/home/xhay/anaconda3/envs/yolov4-gpu/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 97, in convert_to_eager_tensor ctx.ensure_initialized() File "/home/xhay/anaconda3/envs/yolov4-gpu/lib/python3.7/site-packages/tensorflow/python/eager/context.py", line 539, in ensure_initialized context_handle = pywrap_tfe.TFE_NewContext(opts) tensorflow.python.framework.errors_impl.InternalError: CUDA runtime implicit initialization on GPU:0 failed. Status: device kernel image is invalid”

I checked the reason, it was because “Status: device kernel image is invalid” indicates that the TensorFlow package does not contain PTX for your architecture. You can enable compute capabilities by building TensorFlow from source.''

So I want to change the tensorflow2.3 to tensorflow2.2. I want to ask you whether this works? thank you

InputBlackBoxOutput commented 3 years ago

I have the same issue when using the environment set up by conda for GPU. Did you find a way to resolve this issue?

pooldiver69 commented 2 years ago

following. Do you guys have the solution yet?

ndmreda commented 2 years ago

I changed my version of tensorflow from 2.3 to 2.2 and it worked !

InputBlackBoxOutput commented 2 years ago

@ndmreda Thank you for the information 🙂