A compilação do kernel CUDA falhou

3

Eu tenho o geforce 1070, o ubuntu-studio 16.10 e instalei o CUDA 8 (daqui: link ). Eu também instalo o g ++ 5 e faço o symlink

ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc

mas quando eu tento renderizar modelo no liquidificador, eu tenho uma pilha de mensagens depois de "Compilar kernel CUDA". Todo o log (executado a partir do console)

crystal@ustudio:~$ blender
connect failed: No such file or directory
Read new prefs: /home/crystal/.config/blender/2.77/config/userpref.blend
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
AL lib: (WW) ALCjackBackendFactory_init: jack_client_open() failed, 0x11
AL lib: (WW) alc_initconfig: Failed to initialize backend "jack"
read blend: /home/crystal/Downloads/BMW27.blend
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
CUDA version 8.0 detected, build may succeed but only CUDA 7.5 is officially supported.
Compiling CUDA kernel ...
"/usr/local/cuda/bin/nvcc" -arch=sm_61 -m64 --cubin "/usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu" -o "/home/crystal/.config/blender/2.77/cache/cycles_kernel_sm61_19BAB894867FFAFF2ADC00F401D5E4EB.cubin" --ptxas-options="-v" --use_fast_math -I"/usr/share/blender/scripts/addons/cycles/kernel" -DNVCC -D__KERNEL_CUDA_VERSION__=80
/usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu:94:2: error: #error "Unknown or unsupported CUDA architecture, can't determine launch bounds"
 #error "Unknown or unsupported CUDA architecture, can't determine launch bounds"
  ^
/usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu:112:87: error: division by zero in #if
 #if CUDA_MULTIPRESSOR_MAX_REGISTERS/(CUDA_THREADS_BLOCK_WIDTH*CUDA_THREADS_BLOCK_WIDTH*CUDA_KERNEL_MAX_REGISTERS) > CUDA_MULTIPROCESSOR_MAX_BLOCKS
                                                                                       ^
CUDA kernel compilation failed, see console for details.

Refer to the Cycles GPU rendering documentation for possible solutions:
http://www.blender.org/manual/render/cycles/gpu_rendering.html

skipping driver '100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
Error: CUDA kernel compilation failed, see console for details.

blender --version
Blender 2.77 (sub 0)

Como consertar isso? Agradecemos antecipadamente.

    
por Crystal 30.10.2016 / 14:26

3 respostas

0

Isso funcionou para mim no Blender 2.76b (Ubuntu 16.04)

  1. Abra o kernel.cu

sudo gedit /usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu

  1. Encontre a linha mais ou menos assim:

/* 5.0 and 5.2 */

#elif __CUDA_ARCH__ == 500 || __CUDA_ARCH__ == 520

Pode ser um pouco diferente, mas deve começar com #elif __CUDA_ARCH___ ==

  1. Altere essa linha para: %código%

Isso permitirá que o Blender compile para novas arquiteturas CUDA. Pode não funcionar como esperado, e você provavelmente receberá avisos na primeira vez que executá-lo (como ele compila), mas você não receberá mais o erro de compilação. Além disso, isso está funcionando para mim no Ubuntu 16.04 com o Blender 2.76b e CUDA 8.0

    
por 43Tesseracts 19.09.2017 / 19:59
0

Instalar o G ++ 5 resolve o problema. Por favor use o seguinte comando:

sudo apt install g++-5
    
por Pavak Paul 30.06.2017 / 19:28
0

Estou usando o Blender 2.78 com Ubuntu 17.04 e CUDA 8.0:

  • instalar o g ++ 5 não funcionou
  • altere o kernel.cu não funcionou (o Blender 2.78 já tem a alteração)

Mas isso funcionou:

  1. Execute o Blender no modo sudo com o "sudo blender". A renderização com GPU carregou os kernels e a renderização funcionou
  2. Em seguida, execute o Blender normalmente (sem sudo) e a renderização da GPU agora funciona
por user2489151 21.10.2017 / 20:12