cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

qqchose
Adept I

calling clBuildProgram in 2 applications at the same time

Hi,

We have 2 applications. If those application call "clBuildProgram" at the same time, one is building a kernel for GPU and the other is building another kernel for CPU, my screen freeze and after some seconds I got an error and my video driver dies.

Is it intended to not supporting 2 "clBuildProgram" in 2 applications (".exe") at the same time?

Thanks

0 Likes
5 Replies
himanshu_gautam
Grandmaster

Re: calling clBuildProgram in 2 applications at the same time

Is the issues reproducible using APP SDK Samples too? Can you give some steps on how you ran the two applications at the same time, to the issue can be reproduced.

0 Likes
qqchose
Adept I

Re: calling clBuildProgram in 2 applications at the same time

Hi

I did not try with APP SDK sample. I can try, but another day.

In my situation, it was a race condition. I got a freeze and my drivers dies. I found it was while my application call "clBuildProgram". My visual studion was attach to our other application and found the other application was calling "clBuildProgram". I did some test and if we call "clBuildProgram" one after the other, everything is fine.

A way to reproduice is:

- You need 2 project calling "clBuildProgram". (Select a big kernel, it's easier to reproduice)

- Start 1 visual studio by project (then 2 visual studio) (or any IDE)

- Put a breakpoint on "clBuildProgram" in both visual studio (or in your IDE)

- Start the applications (both) in visual studio (or in your IDE) and way until both breakpoint hit

- one after the other resume the applications

I got a crash when we run 2 kernel at the same time too.

0 Likes
himanshu_gautam
Grandmaster

Re: calling clBuildProgram in 2 applications at the same time

Can you please tell, what is the severity of this issue in case it exists? Is it really hindering you from doing something cool?

Also any idea how much time your kernel compilations are taking.

0 Likes
qqchose
Adept I

Re: calling clBuildProgram in 2 applications at the same time

It's not a big issue. we already have a task to move all kernel into the same application. Then, it will be fixed at the same time. If I found another kernel to reproduice, I will add a comment here. It's not a priority for now.

Our GPU kernel need 27.0 seconds to build

Our CPU need 30 seconds to build (Smaller but on CPU it's take longer to build)

Then, for now, it's not a big issue and we can keep this bug, we will use a walkaround by doing doing another task. If this bug reappear I will repost

Thanks

0 Likes
himanshu_gautam
Grandmaster

Re: calling clBuildProgram in 2 applications at the same time

Good to hear that.

I am not sure how the OCL compiler will behave in the situation you had mentioned. Will try to ask some experts

0 Likes