GPUOpen-LibrariesAndSDKs / RadeonRays_SDK

Radeon Rays is ray intersection acceleration library for hardware and software multiplatforms using CPU and GPU
MIT License
1.07k stars 192 forks source link

UnitTest fail: ApiBackEndOpenCL::SetUp - clCreateKernelsInProgram return 0 kernels #149

Open Arlorean opened 7 years ago

Arlorean commented 7 years ago

Running the UnitTest project on Windows 10 in Visual Studio 2017 Debug/x64 shows this CL_BUILD_ERROR: clCreateKernelsInProgram returns 0

It happens in ApiBackEndOpenC::SetUp() while trying to build: ../RadeonRays/src/kernels/CL/intersect_bvh2_skiplinks.cl

Here is the output in the console at the point of failure (all tests up to this point have passed):

[----------] 17 tests from ApiBackendOpenCL
[ RUN      ] ApiBackendOpenCL.DeviceEnum
unknown file: error: Unknown C++ exception thrown in SetUp().
[  FAILED  ] ApiBackendOpenCL.DeviceEnum (1876780 ms)
[ RUN      ] ApiBackendOpenCL.SingleDevice

It's possible I've mis-configured something but I was hoping to get a clean set of unit tests before going any deeper. Any suggestions?

OpenCL can find 3 platforms on my machine in this order:

1. Platform 1.1 Name : Intel(R) OpenCL 1.2 Vendor : Intel(R) Corporation 1.3 Version : OpenCL 2.0 1.4 Profile : FULL_PROFILE 1.5 Extensions : cl_intel_dx9_media_sharing cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_d3d11_sharing cl_khr_depth_images cl_khr_dx9_media_sharing cl_khr_gl_sharing cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_spir 2. Platform 2.1 Name : NVIDIA CUDA 2.2 Vendor : NVIDIA Corporation 2.3 Version : OpenCL 1.2 CUDA 8.0.0 2.4 Profile : FULL_PROFILE 2.5 Extensions : cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts 3. Platform 3.1 Name : AMD Accelerated Parallel Processing 3.2 Vendor : Advanced Micro Devices, Inc. 3.3 Version : OpenCL 2.0 AMD-APP (1800.8) 3.4 Profile : FULL_PROFILE 3.5 Extensions : cl_khr_icd cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_amd_event_callback cl_amd_offline_devices

For those platforms it finds 4 devices (2 for Intel, 1 for NVidia and 1 for AMD): 1. Device: Intel(R) HD Graphics 5600 1.1 Hardware version: OpenCL 2.0 1.2 Software version: 20.19.15.4531 1.3 OpenCL C version: OpenCL C 2.0 1.4 Parallel compute units: 24 2. Device: Intel(R) Core(TM) i7-5700HQ CPU @ 2.70GHz 2.1 Hardware version: OpenCL 2.0 (Build 10094) 2.2 Software version: 5.2.0.10094 2.3 OpenCL C version: OpenCL C 2.0 2.4 Parallel compute units: 8 1. Device: GeForce GTX 970M 1.1 Hardware version: OpenCL 1.2 CUDA 1.2 Software version: 378.66 1.3 OpenCL C version: OpenCL C 1.2 1.4 Parallel compute units: 10 1. Device: Intel(R) Core(TM) i7-5700HQ CPU @ 2.70GHz 1.1 Hardware version: OpenCL 1.2 AMD-APP (1800.8) 1.2 Software version: 1800.8 (sse2,avx) 1.3 OpenCL C version: OpenCL C 1.2 1.4 Parallel compute units: 8

fan3d commented 7 years ago

i also get a crash when i set like this "api->SetOption("acc.type", "hlbvh"); api->SetOption("bvh.builder", "median"); api->SetOption("bvh.force2level", 0.f);" if set acc.type==other type ,it work well .. the crash happen when executing function SortRadixInt32 ,opencl error code is -4 . can any one tell me why this happen,or any one encounter this issue..my platform is win8 64bit,and display card info is "Device Version is OpenCL 1.2 CUDA", "Device Vender is NVIDIA Corporation", "Device Type is GPU", "Device Total Memory is 2048MB", "Device Max Alloc Memory is 512MB", "Device Total ComputeUnits Number is 2", "Max Workitem in each dimension is {1024,0,1024} IDE is vs2015 ,mode is debug .btw the project is \RadeonRays_SDK-master.zip\RadeonRays_SDK-master\Tutorials\Triangle has one geometry .

yozhijk commented 7 years ago

@Arlorean , it is picking IntelCL plarform to run unit tests. Are you using the latest Intel runtime?

Arlorean commented 7 years ago

I was at the time I ran the tests although I see there has been an update to 20.19.15.4624 since I did that.

  1. Device: Intel(R) HD Graphics 5600 1.1 Hardware version: OpenCL 2.0 1.2 Software version: 20.19.15.4531 1.3 OpenCL C version: OpenCL C 2.0 1.4 Parallel compute units: 24

UPDATE: OK I installed The latest Intel Driver (20.19.15.4624) but I still get the same failure(s):

[----------] 17 tests from ApiBackendOpenCL
[ RUN      ] ApiBackendOpenCL.DeviceEnum
unknown file: error: Unknown C++ exception thrown in SetUp().
[  FAILED  ] ApiBackendOpenCL.DeviceEnum (512 ms)
[ RUN      ] ApiBackendOpenCL.SingleDevice
unknown file: error: Unknown C++ exception thrown in SetUp().
[  FAILED  ] ApiBackendOpenCL.SingleDevice (51 ms)
[ RUN      ] ApiBackendOpenCL.Mesh
unknown file: error: Unknown C++ exception thrown in SetUp().
What-a-stupid-username commented 6 years ago

Me too!!!Also in Windows 10 & Visual Studio 2017 Debug/x64. Get same error. Who can help us? T_T

What-a-stupid-username commented 6 years ago

In my case, it seems that a wrong divice has been chosed to run the test.