Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
118 Views

Exception in cuda converted code

Hi,

I converted kNN-Cuda using dpct and am now building it using visual studio 2017 (community edition)

It is throwing exception at run time and I am not sure what it is trying to tell me. Here is the exception message:

0x00007FF8C62ECB9E (0x0000018778877710 0x0000018779038D00 0x0000000000000000 0x00000000FFFFFFFF), GTPIN_IGC_OCL_UpdateKernelInfo() + 0x9E81E bytes(s)
0x00007FF8C62EDFA2 (0x00007FF8C62EB770 0x00007FF8C62EB770 0x0000018779A7CF38 0x0000018779038D00), GTPIN_IGC_OCL_UpdateKernelInfo() + 0x9FC22 bytes(s)
0x00007FF8C62EB8DD (0x0000018779038DA0 0x00007FF8C62EB770 0x0000001A67EFB1B8 0x0000001A67EFB240), GTPIN_IGC_OCL_UpdateKernelInfo() + 0x9D55D bytes(s)
0x00007FF8C62EE562 (0x0000018779CCDD60 0x0000018779AC35B0 0x0000018779734790 0x0000018779AC1E90), GTPIN_IGC_OCL_UpdateKernelInfo() + 0xA01E2 bytes(s)
0x00007FF8C632DEF5 (0x0000000000000000 0x0000018779B2F020 0x0000018779734770 0x000001A77CF35788), GTPIN_IGC_OCL_UpdateKernelInfo() + 0xDFB75 bytes(s)
0x00007FF8C632E607 (0x00007FF8C6D73810 0x0000000000000004 0x0000000000000000 0x000001A77CF35788), GTPIN_IGC_OCL_UpdateKernelInfo() + 0xE0287 bytes(s)
0x00007FF8C6937DC4 (0x000001A77CF357C8 0x0000000000000001 0x00000187780A3C18 0x0000000000000000), getJITVersion() + 0x478024 bytes(s)
0x00007FF8C6937F23 (0x0000000000000000 0x00000187780A3CE0 0x0000000000000001 0x0000000000000000), getJITVersion() + 0x478183 bytes(s)
0x00007FF8C6938143 (0x000001A700000021 0x0000000000000000 0x0000001A67EFB850 0x00000187780A3BE0), getJITVersion() + 0x4783A3 bytes(s)
0x00007FF8C6937849 (0x0000001A67EFB858 0x0000001A67EFB5C0 0x0000001A67EFBA40 0x0000000000000000), getJITVersion() + 0x477AA9 bytes(s)
0x00007FF8C626B13C (0x0000001A67EFB8A0 0x00007FF8C620A9DC 0x0000018779B3EE08 0x0000001A67EFB8A0), GTPIN_IGC_OCL_UpdateKernelInfo() + 0x1CDBC bytes(s)
0x00007FF8C626B3DE (0x0000000000000000 0x0000000000000000 0x0000018779B2F200 0x00000187798EFA80), GTPIN_IGC_OCL_UpdateKernelInfo() + 0x1D05E bytes(s)
0x00007FF8C6208041 (0x00007FF8C6218F40 0x0000018779BF5D60 0x00000187743C23C0 0x0000018778BEF790)
0x00007FF8C6217731 (0x0000018778BEF1F0 0x00007FF8C6216310 0xFFB501DB486DAC4E 0x3FFFFFF883B6556B), CIFCreateMain() + 0xF11 bytes(s)
0x00007FF8C6217994 (0x00007FF8C6217920 0x0000000000000000 0x0000001A67EFD4E0 0x0000018779BF6150), CIFCreateMain() + 0x1174 bytes(s)
0x00007FF8756CB59E (0x0000018778BEF250 0x0000001A67EFD4F9 0x00007FF8C6217BC0 0x0000018778BEF1F0), clGetGLContextInfoKHR() + 0x17CFE bytes(s)
0x00007FF8756C3471 (0x0000000000141BF7 0x0000000000141BF7 0x0000000000000006 0x0000000000141BF7), clGetGLContextInfoKHR() + 0xFBD1 bytes(s)
0x00007FF875589CD9 (0x000030BF514CD720 0x00000187790E2980 0x00000187790E2980 0x00000187743A40A0), GTPin_Init() + 0x37CB9 bytes(s)
0x00007FF8755466BA (0x0000001A67EFD998 0x0000018777CB1D88 0x0000001A67EFD980 0xFFFFFFFFFFFFF680), clBuildProgram() + 0x22A bytes(s)
0x00007FF87530D2CC (0x0000000000000000 0x00007FF8E5EDFB91 0xFFFFFFFFFFFFFFFE 0x00000187719E0000), clLinkProgram() + 0x43C bytes(s)
0x00007FF8B2D0221A (0x0000001A67EFDB80 0x0000000000000000 0x0000000000000020 0x0000000000000000), OclpiProgramLink() + 0x5A bytes(s)
0x00007FF8A2EF8569 (0x0000000000000009 0x0000000000000004 0x0000001A67EFEF01 0x00007FF87554320C), ?build@ProgramManager@detail@sycl@cl@@AEAA?AV?$unique_ptr@U_pi_program@@P6A?AW4_pi_result@@PEAU1@@Z@std@@V56@V?$shared_ptr@Vcontext_impl@detail@sycl@cl@@@6@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@6@2AEBV?$vector@PEAU_pi_device@@V?$allocator@PEAU_pi_device@@@std@@@6@AEAV?$map@W4DeviceLibExt@detail@sycl@cl@@PEAU_pi_program@@U?$less@W4DeviceLibExt@detail@sycl@cl@@@std@@V?$allocator@U?$pair@$$CBW4DeviceLibExt@detail@sycl@cl@@PEAU_pi_program@@@std@@@7@@6@_N@Z() + 0x1089 bytes(s)
0x00007FF8A2EF23C6 (0x00000187780C78B0 0x00000000000000C0 0x0000018778C1DB60 0x000000000000007C), ?getBuiltPIProgram@ProgramManager@detail@sycl@cl@@QEAAPEAU_pi_program@@_JAEBVcontext@34@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z() + 0x5C6 bytes(s)
0x00007FF8A2EF2EAE (0x0000000000000040 0x00000187719C0CC0 0x00000187719C02A8 0x0000000000000000), ?getOrCreateKernel@ProgramManager@detail@sycl@cl@@QEAAPEAU_pi_kernel@@_JAEBVcontext@34@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z() + 0x2E bytes(s)
0x00007FF8A2F17D6C (0x0000001A67EFE9E0 0x00007FF8E5EDC43F 0x0000001A67EFEF01 0x0000018778E55050), ?enqueueImp@ExecCGCommand@detail@sycl@cl@@EEAAHXZ() + 0x213C bytes(s)
0x00007FF8A2F0B08F (0x0000000000000000 0x00007FF8E5EDFB91 0x0000018777CB1250 0x00007FF8E3DB14CB), ?enqueue@Command@detail@sycl@cl@@QEAA_NAEAUEnqueueResultT@234@W4BlockingT@234@@Z() + 0xBF bytes(s)
0x00007FF8A2F1EECC (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x000001877905AED0), ?addCG@Scheduler@detail@sycl@cl@@QEAA?AV?$shared_ptr@Vevent_impl@detail@sycl@cl@@@std@@V?$unique_ptr@VCG@detail@sycl@cl@@U?$default_delete@VCG@detail@sycl@cl@@@std@@@6@V?$shared_ptr@Vqueue_impl@detail@sycl@cl@@@6@@Z() + 0xFC bytes(s)
0x00007FF8A2F459CC (0x000000000000008E 0x00000187719E0000 0x00000187719E0000 0x00007FF8E5EE60B9), ?finalize@handler@sycl@cl@@AEAA?AVevent@23@AEBUcode_location@detail@23@@Z() + 0x10DC bytes(s)
0x00007FF8A2F51559 (0x0000001A67EFF460 0x00007FF69579740C 0x0000000000000002 0x0000000000000058), ?submit_impl@queue_impl@detail@sycl@cl@@AEAA?AVevent@34@AEBV?$function@$$A6AXAEAVhandler@sycl@cl@@@Z@std@@V?$shared_ptr@Vqueue_impl@detail@sycl@cl@@@7@AEBUcode_location@234@@Z() + 0xE9 bytes(s)
0x00007FF8A2F50976 (0x0000000000000001 0x0000018700000000 0x00000187785B5C20 0x00000187785B5D70), ?submit_impl@queue@sycl@cl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@sycl@cl@@@Z@std@@AEBUcode_location@detail@23@@Z() + 0x56 bytes(s)
0x00007FF69514EAF8 (0x01D632CA75995B3D 0x00007FF69580A34E 0x0000018773C28040 0x0000000000001000), knn_cuda_global() + 0x808 bytes(s), C:\Users\intel\source\repos\kNN\kNN\knncuda.dp.cpp, line 433 + 0xD0 byte(s)
0x00007FF695185889 (0x0000001A67EFF778 0x0000000000000001 0x00007FF698587650 0x0000018771A13029), test() + 0xD9 bytes(s), C:\Users\intel\source\repos\kNN\kNN\test.cpp, line 244 + 0x29 byte(s)
0x00007FF695185CE2 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), main() + 0x1B2 bytes(s), C:\Users\intel\source\repos\kNN\kNN\test.cpp, line 354
0x00007FF695706754 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), __scrt_common_main_seh() + 0x10C bytes(s), d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288 + 0x22 byte(s)
0x00007FF8E5047BD4 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
0x00007FF8E5F0CE51 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)

C:\Users\intel\source\repos\kNN\x64\Release\kNN.exe (process 7120) exited with code -1073741819.

Complete visual solution is attached.(kNN.7z)

Any help is appreciated.

Regards,
Gagan

Tags (1)
0 Kudos
4 Replies
Highlighted
Moderator
118 Views

Hi Gagan,

We tried the same solution file that you have provided on Windows 10 with VS-2019 and Intel OneAPI base Kit beta-06 and we are also getting the exception with your default settings.

So we are escalating this to our concerned team. They will get back to you.

Meanwhile, you can try the same on the CPU by doing the following changes:

In Configuration Properties -> Debugging -> Environment add SYCL_DEVICE_TYPE=CPU

 

 

Warm Regards,

Abhishek

0 Kudos
Highlighted
118 Views

I tried with the flag SYCL_DEVICE_TYPE=CPU and the code is getting stuck in a forever loop.

Regards,
Gagan

0 Kudos
Highlighted
118 Views

Hi Gagan,

This looks like a known issue which is currently being investigated by the Engineering team. I'll update you with the findings once available.

0 Kudos
Highlighted
72 Views

Hi,

I tried converting kNN-CUDA code using dpct beta08 version. I notice that there are some changes in the code but sadly end result is still the same ie it throws an exception at run time LLVM ERROR: SPIRV internal error

Output:

PARAMETERS
- Number reference points : 16384
- Number query points     : 4096
- Dimension of points     : 128
- Number of neighbors     : 16

Ground truth computation in progress...

TESTS
- knn_cuda_global   : ref_dev: 000001E0522D0000 query_dev: 000001E052AD0000 dist_dev: 000001E052CD0000 index_dev: 000001E062CD0000

LLVM ERROR: SPIRV internal error.

 I'm compiling with:

clang++ -fcxx-exceptions -D_CRT_SECURE_NO_WARNINGS -DDPCT_USM_LEVEL_NONE -o test.exe test.cpp knncuda.dp.cpp -lmkl_sycl -lmkl_rt -lmkl_core -lsycl -lOpenCL

I have attached VS2019 solution. 

Regards,
Gagan

0 Kudos