cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

timchist
Elite

clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

I have two computers with AMD GPUs: one of them has 13.4 driver installed (ATI Radeon HD 5850), while the other one has 13.6 beta (AMD Radeon HD 7970).

I compile OpenCL code into binaries (as described in the KB115 article of the AMD knowledge base) on the machine with 13.6 and then use them on the other machine with 13.4.

Both machines are running Windows 7 x64.


In some cases for some kernels the application which uses precompiled binaries crashes in amdocl.dll / amdocl64.dll when clBuildProgram is called:


Problem signature:

  Problem Event Name:    APPCRASH

  Application Name:    UseOCLOffline.exe

  Application Version:    0.0.0.0

  Application Timestamp:    51c902c5

  Fault Module Name:    amdocl.dll

  Fault Module Version:    10.0.1084.4

  Fault Module Timestamp:    50d225d5

  Exception Code:    c0000005

  Exception Offset:    004370e6

  OS Version:    6.1.7601.2.1.0.256.4

  Locale ID:    1049

  Additional Information 1:    0a9e

  Additional Information 2:    0a9e372d3b4ad19135b953a78882e789

  Additional Information 3:    0a9e

  Additional Information 4:    0a9e372d3b4ad19135b953a78882e789

Interestingly, the result seems to be quite unstable, that is, sometimes the binary produced from a kernel works fine, but some launches result in a failure (of 10 launches in a row 3 resulted in a failure).

I'm attaching the source file of the kernels I'm compiling as well as a binary produced from this kernel (the binary is for Cypress, compiled and used in 32-bit mode).

0 Likes
16 Replies
himanshu_gautam
Grandmaster

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

Getting a cypress may be bit tough, as it is quite old now

Can the issue be  reproduced using kernel analyzer?

I tried with 13.6 driver, and kernel compiles for all 19 devices for me.

0 Likes
timchist
Elite

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

You are missing the point. Compilation on 13.6 works, but loading of kernels pre-compiled on 13.6 (clBuildProgram preceeded by clCreateProgramWithBinary) fails on 13.4. Kernel Analyzer cannot open such binaries and there is little point analyzing sources.

0 Likes
nou
Exemplar

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

most likely they changed binary format. why do you want load binary from newer driver load into older driver?

0 Likes
timchist
Elite

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

Because that is how we ship applications to our customers -- with precompiled binaries instead of giving away OpenCL source code. That is a quote from KB115:

For ISVs and other developers concerned about making the source code of their OpenCL™ C kernels available to the end user, offline compilation is the preferred deployment method.
himanshu_gautam
Grandmaster

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

oh right. my fault

well nou's question is justified. Me too interested there.

Also, if you want me to run the compiled binaries, It will be helpful, if you can provide host code too.

EDIT: If the binaries are running with 13.6 runtime, why not ask your clients to upgrade the driver?

0 Likes
timchist
Elite

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver


EDIT: If the binaries are running with 13.6 runtime, why not ask your clients to upgrade the driver?


Too many of them. In addition, 13.6 is still beta.


It will be helpful, if you can provide host code too.


I reproduced this problem using the sample code attached to KB115.

0 Likes
himanshu_gautam
Grandmaster

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

okay. Well problem at my end, would be that AMD shall not fix a issue from old driver, if it is not reproduced in the latest driver.

As far as beta-ness of driver is concerned, you can probably wait for a few weeks, I am hoping to see the next stable version catalyst released somewhere with APP SDK.

Please note, i am just making an educated guess here

0 Likes
timchist
Elite

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

Hi Himanshu,

I understand your point, however, I do not agree with your verdict. In my opinion this is a regression issue that needs to be addressed. All documentation on offline compilation I could find (knowledge base article KB115 and Appendix E in AMD APP OpenCL Programming Guide) do not say that binaries may be dependent on driver version. Moreover, KB115 specifically recommends this approach for ISVs that want to distribute their applications without exposing OpenCL source code. So either the documents are incomlete/incorrect or there is a regression issue between Catalyst 13.6 and 13.4.

In my opinion, this needs to be investigated by AMD and either the driver needs to be fixed, or the documentation on offline compilation needs to be updated to specifically say that binary format may change from one version of driver to another. We can certainly embed driver-check in our apps and require users to upgrade the driver, but we'd like to know where AMD stands here and what to expect in future versions: will it break again? what's the extent of the problem? which devices are affected? to what extend can we trust documentation from AMD?

This issue shouldn't be left unattended.

Regards,

Tim

0 Likes
nou
Exemplar

Re: clBuildProgram crashes on 13.4 driver on a binary built with 13.6 beta driver

but then they can't change binary format at all. yes it should just fail and not crash. I am quite sure that old binaries are compatible with newer driver. But in other way you can't except 100% compatibility.

0 Likes