AnsweredAssumed Answered

clLinkProgram crashes when trying to create program from bitcode file. An unhandled exception is thrown out from "amdocl12cl64.dll"

Question asked by cuijing on Sep 15, 2016
Latest reply on Oct 17, 2016 by dipak

I tried to create opencl program from bitcode file. I used clang to convert *.cl file to *.bc file by calling command

clang -cc1 -emit-llvm-bc -triple spir64-unknown-unknown -cl-std=CL1.2 -cl-spir-compile-options "-cl-std=CL1.2" -include opencl_spir.h test1.cl -o test1.bc

 

In host program, I loaded test1.bc and created program by clCreateProgramWithBinary. Then, I compiled program by clCompileProgram. So far so good. However, when I called clLinkProgram to link compiled program, an unhandled exception was thrown out from "amdocl12cl64.dll". I attached error message screen shot, cl file and bitcode file.

 

For some other cl files with simple implementation, such as adding two images, it worked all well. But for the implementations as shown in test1.cl (unsharp mask calculation) which iterates 2D neighborhood, crash would happen. I've been stuck here for three days.

 

Does anybody know any clue about this? Please help me.

Attachments

Outcomes