GPU compilation : trap situation ?

GPU compilation : trap situation ?

Hi,

I try to run my kernel on Intel GPU but during compilation I got the following error :

"error: trap situation detected...aborting"

"error: midlevel compiler failed build."

What that ?

Thx

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Not sure about the trap message but looks like the compiler crashed for some reason. Can you attach the kernel? Or isolate the crash to the snippet of code that is causing the crash?

Thanks,
Raghu

Hi,

It is for a commercial software... so, I cannot put the kernel publicly on the forum.

Please, can you contact my by email, then I will send you the kernel ?

Krys

Hi,

I post this because I faced the same problem and I thought that it would be useful to share my solution, as this is the only post I have found about it.
The problem is quite silly (and, somehow, embarrasing).
I could isolate the line that is crashing my code with the same problem. It is:

unsigned int A[2];
A[0] = 1; //This does not compile. Trap Situation error.

However, replacing the previous line by this line, it compiled:

unsigned int A[2];
A[0] = 0; //This does compile

That was strange and I spent some time working around the declaration of A, which I felt that was somehow wrong.
In fact, assigning to A[0] any value, expression or variable different than 0, results in a Trap Situation.

After some time, I figured out that I had a wrong declaration of variable unrelated to A:

unsigned int currentSnapshot[0]; //Wrong declaration

This declaration was undetected by the compiler and resulted in an unexpected behavior with the error messages:

"error: trap situation detected...aborting"
"error: midlevel compiler failed build."

I hope that this helps someone who is facing similar problems.

Leave a Comment

Please sign in to add a comment. Not a member? Join today