Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake found wrong opencl path #11

Open
SilentWalker opened this issue Jun 19, 2018 · 2 comments
Open

cmake found wrong opencl path #11

SilentWalker opened this issue Jun 19, 2018 · 2 comments

Comments

@SilentWalker
Copy link

Hi,
i've installed intel opencl driver on ubuntu 16.04 following this link https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver , the path of opencl lib is /opt/intel/opencl ,and when i ran clinfo , i got these outputs in first few lines :

Number of platforms 1
Platform Name Intel(R) OpenCL
Platform Vendor Intel(R) Corporation
Platform Version OpenCL 1.2
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_spir
Platform Extensions function suffix INTEL
Platform Name Intel(R) OpenCL

and device info :

Device Name Intel(R) Celeron(R) CPU J3455 @ 1.50GHz
Device Vendor Intel(R) Corporation
Device Vendor ID 0x8086
Device Version OpenCL 1.2 (Build 475)
Driver Version 1.2.0.475
Device OpenCL C Version OpenCL C 1.2
Device Type CPU
Device Profile FULL_PROFILE

Device Name Intel(R) HD Graphics
Device Vendor Intel(R) Corporation
Device Vendor ID 0x8086
Device Version OpenCL 1.2
Driver Version r5.0.63503
Device OpenCL C Version OpenCL C 1.2
Device Type GPU
Device Profile FULL_PROFILE

but cmake ../ found the wrong version and path of opencl :

ubuntu@ubuntu-bitinvo:~/Darknet-On-OpenCL/build$ cmake ../
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - found
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "2.0")
-- Found OpenCV: /usr/local (found version "3.4.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/Darknet-On-OpenCL/build

run ./darknet detect ~/tiny_yolo_optimized/tiny-yolo-op_final.cfg ~/tiny_yolo_optimized/tiny-yolo-op_final.weights data/dog.jpg and the output is :

layer filters size input output
0 conv 16 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 16 0.150 BFLOPs
1 blas_kernels_1.cl build log:
1:81:45: warning: implicit conversion from integral type to floating point type for overloadable function might lead to ambiguity
float mhat = m[index] / (1.0 - pow(B1, t));
~~~ ^
1:82:45: warning: implicit conversion from integral type to floating point type for overloadable function might lead to ambiguity
float vhat = v[index] / (1.0 - pow(B2, t));
~~~ ^
1:189:55: warning: implicit conversion from integral type to floating point type for overloadable function might lead to ambiguity
variance[i] += pow((x[index] - mean[i]), 2);
~~~ ^
1:330:62: warning: implicit conversion from integral type to floating point type for overloadable function might lead to ambiguity
sum += (i+id < spatial) ? pow((x[index] - mean[filter]), 2) : 0;
~~~ ^
fcl build 1 succeeded.
bcl build succeeded.

max 2 x 2 / 2 416 x 416 x 16 -> 208 x 208 x 16
2 conv 32 3 x 3 / 1 208 x 208 x 16 -> 208 x 208 x 32 0.399 BFLOPs
3 max 2 x 2 / 2 208 x 208 x 32 -> 104 x 104 x 32
4 conv 64 3 x 3 / 1 104 x 104 x 32 -> 104 x 104 x 64 0.399 BFLOPs
5 max 2 x 2 / 2 104 x 104 x 64 -> 52 x 52 x 64
6 conv 128 3 x 3 / 1 52 x 52 x 64 -> 52 x 52 x 128 0.399 BFLOPs
7 max 2 x 2 / 2 52 x 52 x 128 -> 26 x 26 x 128
8 conv 256 3 x 3 / 1 26 x 26 x 128 -> 26 x 26 x 256 0.399 BFLOPs
9 max 2 x 2 / 2 26 x 26 x 256 -> 13 x 13 x 256
10 conv 512 3 x 3 / 1 13 x 13 x 256 -> 13 x 13 x 512 0.399 BFLOPs
11 conv 30 1 x 1 / 1 13 x 13 x 512 -> 13 x 13 x 30 0.005 BFLOPs
12 detection
mask_scale: Using default '1.000000'
Loading weights from /home/ubuntu/tiny_yolo_optimized/tiny-yolo-op_final.weights...Done!
im2col_kernels.cl build log:
2:36:18: warning: '/*' within block comment
//*data_col_ptr = data_im_ptr[ii * width + jj];
^
fcl build 1 succeeded.
bcl build succeeded.

activation_kernels.cl build log:
fcl build 1 succeeded.
bcl build succeeded.

maxpool_layer_kernels.cl build log:
fcl build 1 succeeded.
bcl build succeeded.

warning: Linking two modules of different data layouts: '' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024' whereas '' is 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32:64'

warning: Linking two modules of different target triples: ' is 'spir' whereas '' is 'vISA_32'

warning: Linking two modules of different data layouts: '' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024' whereas '' is 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32:64'

warning: Linking two modules of different target triples: ' is 'spir' whereas '' is 'vISA_32'

warning: Linking two modules of different data layouts: '' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024' whereas '' is 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32:64'

warning: Linking two modules of different target triples: ' is 'spir' whereas '' is 'vISA_32'

warning: Linking two modules of different data layouts: '' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024' whereas '' is 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32:64'

warning: Linking two modules of different target triples: ' is 'spir' whereas '' is 'vISA_32'

warning: Linking two modules of different data layouts: '' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024' whereas '' is 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32:64'

warning: Linking two modules of different target triples: ' is 'spir' whereas '' is 'vISA_32'

warning: Linking two modules of different data layouts: '' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024' whereas '' is 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32:64'

warning: Linking two modules of different target triples: ' is 'spir' whereas '' is 'vISA_32'

opencl execution error, code -11 -11
terminate called after throwing an instance of 'std::runtime_error'
what(): OpenCL error, code: -11
Aborted (core dumped)

@ganyc717
Copy link
Owner

-11 means CL_BUILD_PROGRAM_FAILURE, may be I used some extensions in the kernel that didn't support on your platform, could you find which kernel program compile failed?

@SilentWalker
Copy link
Author

i added cout sourcefileName in buildProgramFromFile , and the output is

...
warning: Linking two modules of different data layouts: '' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024' whereas '' is 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32:64'

warning: Linking two modules of different target triples: ' is 'spir' whereas '' is 'vISA_32'

warning: Linking two modules of different data layouts: '' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024' whereas '' is 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32:64'

warning: Linking two modules of different target triples: ' is 'spir' whereas '' is 'vISA_32'

start build blas_kernels_2.cl

opencl execution error, code -11 -11
terminate called after throwing an instance of 'std::runtime_error'
what(): OpenCL error, code: -11
Aborted (core dumped)

i guess there is something wrong in blas_kernels_2.cl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants