<html>
<head>
<meta content="text/html; charset=iso-8859-15"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>After further investigation, it turns out that the problem is
the > operator (and </tt><tt>isgreater() aswell</tt><tt>)</tt><tt>.
In fact, prepending this to the kernel:</tt><tt><br>
</tt>
<blockquote><tt>#define isgreater(x, y)
((convert_int2(copysign((float2)1, y - x)) - 1) / 2)</tt><tt><br>
</tt></blockquote>
<tt>and replacing the > operator with the explicit relational
function fixes the problem.</tt><tt><br>
</tt><tt>I also forgot to me</tt><tt>ntion that I'm on Ivy Bridge
hardware.<br>
</tt><tt><br>
</tt>
<div class="moz-cite-prefix"><tt>Il 29/09/2015 21:07, Lorenzo
Pistone ha scritto:</tt><tt><br>
</tt></div>
<blockquote cite="mid:560AE186.3000107@gmail.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-15">
<tt> </tt><tt>Hello, the following kernel causes an assertion
failed:</tt><tt><br>
</tt>
<blockquote><tt>__kernel void test(__global float2* ff){</tt><tt><br>
</tt><tt> </tt><tt> float2 f1 = ff[0], f2 = ff[1];</tt><tt><br>
</tt><tt> </tt><tt> float2 dist = f1 - f2;</tt><tt><br>
</tt><tt> </tt><tt> dist += convert_float2(fabs(dist) >
0.5f) * </tt><tt>convert_float2(</tt><tt>copysign((coord)1,
dist));</tt><tt><br>
</tt><tt> </tt><tt> ff[3] = dist;</tt><tt><br>
</tt> <tt>}</tt><tt><br>
</tt> </blockquote>
<tt>Result is:</tt><tt><br>
</tt>
<blockquote><tt>ASSERTION FAILED: Not supported</tt><tt><br>
</tt><tt> </tt><tt> at file
/home/pisto/sorgenti/beignet/backend/src/./ir/context.hpp,
function gbe::ir::ImmediateIndex
gbe::ir::Context::newIntegerImmediate(int64_t, gbe::ir::Type),
line 95</tt><tt><br>
</tt> </blockquote>
</blockquote>
<tt><br>
</tt>
</body>
</html>