Darknet: Can't compile with GPU=1 gencode error

Created on 11 Nov 2018  Â·  8Comments  Â·  Source: pjreddie/darknet

Hi,
I'm having this error and I looked the other issues but none had this type of error:
/bin/sh: 1: -gencode: not found
Makefile:92: recipe for target 'obj/convolutional_kernels.o' failed
make: * [obj/convolutional_kernels.o] Error 127

I looked for a file called gencode but I cannot find it
I'm using ubuntu 18.04 + cuda 10.0 + cuddn 7.4
GPU: GeForce GTX 1050

Most helpful comment

  1. after cloning darknet, make it with root (sudo)
  2. set NVCC = /usr/local/cuda/bin/nvcc
    Your NVCC should match with the cuda library you specify in the Makefile

All 8 comments

Similar error, ubuntu 18.04 + cuda 9.1; GPU GeForce GTX 1050. Still figuring out if I have cudnn installed properly.

/tmp/tmpxft_00004bd1_00000000-5_convolutional_kernels.compute_52.cudafe1.stub.c: In function ‘void __device_stub__Z15binarize_kernelPfiS_(float, int, float)’:
/tmp/tmpxft_00004bd1_00000000-5_convolutional_kernels.compute_52.cudafe1.stub.c:13:87: error: ‘__args_arr’ was not declared in this scope
d __device_stub__Z15binarize_kernelPfiS_(float __par0, int __par1, float *__par2){__cudaSetupArgSimple(__par0, 0UL);__cudaSetupArgSimple(__par1, 8UL);__cudaSetupArgSimple(__par2, 16UL);__cudaLaunch(((char *)((void ( *)(float *, int, float *))binarize_kernel)));}
^
compilation terminated due to -Wfatal-errors.
Makefile:92: recipe for target 'obj/convolutional_kernels.o' failed
make: *
* [obj/convolutional_kernels.o] Error 1

Turns out I didn't install cuda properly. Followed these steps, and got everything to work: https://linoxide.com/linux-how-to/install-cuda-ubuntu/

Hi Thomas - I'm experiencing the similar 'convolutional_kernels.o' failed problem. I'm also running Ubuntu 18.04, but with Cuda 10, GTX 1050. I installed the driver 415.27. Samples seem to work, but darknet fails to compile. Based on what I've read - it should work with Cuda 10 - but I can't seem to resolve this. I checked through the link you provided, and other than the version difference, I think everything is setup correctly. Any ideas? Thanks - Jeff.

  1. after cloning darknet, make it with root (sudo)
  2. set NVCC = /usr/local/cuda/bin/nvcc
    Your NVCC should match with the cuda library you specify in the Makefile
  1. after cloning darknet, make it with root (sudo)
  2. set NVCC = /usr/local/cuda/bin/nvcc
    Your NVCC should match with the cuda library you specify in the Makefile

thank you !

maybe you should use cuda-8.0

hi
I am on an SSH server and i get this error

Makefile:168: recipe for target 'obj/convolutional_kernels.o' failed
make: * [obj/convolutional_kernels.o] Error 127

Hi,
I'm getting this error.

/bin/sh: 1: nvcc: not found
Makefile:168: recipe for target 'obj/convolutional_kernels.o' failed
make: * [obj/convolutional_kernels.o] Error 127

When I use nvcc --version I get this output
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Mon_Mar_11_22:13:24_CDT_2019
Cuda compilation tools, release 10.0, V10.0.326

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheHidden1 picture TheHidden1  Â·  3Comments

arianaa30 picture arianaa30  Â·  3Comments

job2003 picture job2003  Â·  3Comments

sujithm picture sujithm  Â·  3Comments

gpsmit picture gpsmit  Â·  3Comments