yolov4-deepsort icon indicating copy to clipboard operation
yolov4-deepsort copied to clipboard

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

Open ypxingxing opened this issue 3 years ago • 4 comments

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

ypxingxing avatar Jun 09 '21 07:06 ypxingxing

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

InputBlackBoxOutput avatar Sep 09 '21 17:09 InputBlackBoxOutput

following. Do you guys have the solution yet?

pooldiver69 avatar Oct 29 '21 04:10 pooldiver69

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

ndmreda avatar May 11 '22 15:05 ndmreda

@ndmreda Thank you for the information 🙂

InputBlackBoxOutput avatar May 11 '22 15:05 InputBlackBoxOutput