Я пытаюсь скомпилировать мою программу CUDA/C++ в режиме выпуска, но я получаю следующую ошибку:
make all
Building file: ../matching.cu
Invoking: NVCC Compiler
nvcc -O3 -gencode arch=compute_30,code=sm_30 -odir "" -M -o "matching.d" "../matching.cu"
nvcc --compile -O3 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_30,code=sm_30 -x cu -o "matching.o" "../matching.cu"
/usr/lib/gcc/x86_64-linux-gnu/4.6/include/xmmintrin.h(1015): error: identifier "__builtin_ia32_vec_set_v4hi" is undefined
/usr/lib/gcc/x86_64-linux-gnu/4.6/include/xmmintrin.h(1116): error: identifier "__builtin_ia32_pshufw" is undefined
/usr/lib/gcc/x86_64-linux-gnu/4.6/include/emmintrin.h(1312): error: identifier "__builtin_ia32_vec_ext_v8hi" is undefined
/usr/lib/gcc/x86_64-linux-gnu/4.6/include/emmintrin.h(1318): error: identifier "__builtin_ia32_vec_set_v8hi" is undefined
../matching.cu(104): warning: variable "device" is used before its value is set
../matching.cu(209): warning: variable "min" was declared but never referenced
4 errors detected in the compilation of "/tmp/tmpxft_00000af7_00000000-6_matching.cpp1.ii".
make: *** [matching.o] Error 2
**** Build Finished ****
Вы, ребята, знаете, в чем причина этих сообщений? Спасибо.
Я использую версию Eclipse NVIDIA Nsight с инструментарием CUDA 5.0 в Ubuntu 14.04 LTS.
Моя проблема решена. Это связано с тем, что CUDA toolkit 5.0 не поддерживается в Ubuntu 14.04 LTS. Я изменил свое оборудование (Новая видеокарта), чтобы обновить драйвер NVIDIA, который позволил мне установить CUDA takeit 6.0 (официально не поддерживается в 14.04, но имеет лучшую совместимость)
matching.cu
#include <iostream> #include <cstdio> #include <cmath> #include <iomanip> #include <thrust/sort.h> #include <thrust/host_vector.h> #include <thrust/device_vector.h>