<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi Sven in Intel® Embree Ray Tracing Kernels</title>
    <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045930#M464</link>
    <description>&lt;P&gt;Hi Sven&lt;/P&gt;

&lt;P&gt;1) Happens in both: Debug and Release&lt;/P&gt;

&lt;P&gt;2) I've tested in 32-bits only, with fix both 32 and 64 works fine,&lt;/P&gt;

&lt;P&gt;3) Sorry, I don;t know what is a regression test&lt;/P&gt;

&lt;P&gt;4) I use ICC 13.0 for OSX (registered user). I'm not very happy with this build but now I can't upgrade to latest (no $)&lt;/P&gt;

&lt;P&gt;Thx for your support&lt;/P&gt;</description>
    <pubDate>Tue, 18 Nov 2014 12:44:25 GMT</pubDate>
    <dc:creator>Igor_Igor</dc:creator>
    <dc:date>2014-11-18T12:44:25Z</dc:date>
    <item>
      <title>AVX crash</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045926#M460</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;OSX 9.5, Embree 2.3.3 built with icc 13. Crashes on machine with AVX, same scene renders Ok with ssse3, sse4.1 etc. It's machine of my partner, mine has no AVX. So I added a log and see:&amp;nbsp; bvh tree/nodes are Ok, but invalid node is pop from stack. I've fixed it in file Bvh8_intersector1.cpp, line 98&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;#if defined(__AVX2__)&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const avxf tNear = maxi(maxi(tNearX,tNearY),maxi(tNearZ,ray_near));&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const avxf tFar&amp;nbsp; = mini(mini(tFarX ,tFarY ),mini(tFarZ ,ray_far ));&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const avxb vmask = cast(tNear) &amp;gt; cast(tFar);&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size_t mask = movemask(vmask)^0xff;&lt;BR /&gt;
		#else&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const avxf tNear = max(tNearX,tNearY,tNearZ,ray_near);&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const avxf tFar&amp;nbsp; = min(tFarX ,tFarY ,tFarZ ,ray_far);&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const avxb vmask = tNear &amp;lt;= tFar;&lt;BR /&gt;
		//II&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size_t mask = movemask(vmask);&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size_t mask = movemask(vmask) &amp;amp; (BVH8::N - 1);&lt;BR /&gt;
		#endif&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Without it the "mask" is invalid, higher 2 bytes are non-zero.&amp;nbsp; It happens randomly like once per 100K rays. Please advice a better solution.&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2014 06:41:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045926#M460</guid>
      <dc:creator>Igor_Igor</dc:creator>
      <dc:date>2014-11-04T06:41:24Z</dc:date>
    </item>
    <item>
      <title>That sound weird. Only the</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045927#M461</link>
      <description>&lt;P&gt;That sound weird. Only the lower 8 bits can be set in the mask. First, your fix is not correct, you have to and the mask with 0xFF to clear out the invalid bits. Could you try this and tell if the problem goes away?&lt;/P&gt;

&lt;P&gt;Could you also send us a ray stream log including geometry of the model is possible? To do so enable RTCORE_ENABLE_RAYSTREAM_LOGGER in cmake and run your application. This will store the geometry, and the rays traversed onto disk. Best do this with your fix enabled such that the appliation does not yet crash. Then disable the&amp;nbsp;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;RTCORE_ENABLE_RAYSTREAM_LOGGER again in cmake and try to replay the logs using the retrace application. If the error occurs during replay, please send us the logs for further debugging.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 06:12:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045927#M461</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2014-11-05T06:12:05Z</dc:date>
    </item>
    <item>
      <title>Hello and sorry for delay (no</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045928#M462</link>
      <description>&lt;P&gt;Hello and sorry for delay (no AVX machine in my hands)&lt;/P&gt;

&lt;P&gt;1) I've set mask to 0xFF and got crash back. Checked again, movemask works as it should, sets bits in low byte only&lt;/P&gt;

&lt;P&gt;2) After more logging I see the problem is here&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;// stack1 0xf55e460, 0xf55a460, 0xf5559a0, 0xf554dc0&lt;BR /&gt;
		sort(stackPtr[-1],stackPtr[-2],stackPtr[-3],stackPtr[-4]);&lt;BR /&gt;
		// stack2 0xf554dc0, 0x0, 0xf55e460, 0xf5559a0&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Then I found :FIXME&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&amp;nbsp; template&amp;lt;typename T&amp;gt;&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp; struct StackItemInt32&lt;BR /&gt;
		&amp;nbsp; {&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp; __forceinline static void swap2(StackItemInt32&amp;lt;T&amp;gt;&amp;amp; a, StackItemInt32&amp;lt;T&amp;gt;&amp;amp; b) {&lt;BR /&gt;
		//II #if defined(__AVX__) &amp;amp;&amp;amp; defined(__INTEL_COMPILER) // FIXME: works only if sizeof(T) is 8 bytes large&lt;BR /&gt;
		#if 0&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* use sse registers to copy stack items */&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ssef sse_a = load4f(&amp;amp;a);&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ssef sse_b = load4f(&amp;amp;b);&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; store4f(&amp;amp;a,sse_b);&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; store4f(&amp;amp;b,sse_a);&lt;BR /&gt;
		#else&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StackItemInt32&amp;lt;T&amp;gt; t = b; b = a; a = t;&lt;BR /&gt;
		#endif&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;It should not work in 32-bit becase swapped size &amp;gt; sizeof. When I set #if 0 - renders fine, no crash&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2014 17:02:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045928#M462</guid>
      <dc:creator>Igor_Igor</dc:creator>
      <dc:date>2014-11-10T17:02:37Z</dc:date>
    </item>
    <item>
      <title>Hi Igor,</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045929#M463</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;

&lt;P&gt;some questions to better reproduce the issue:&lt;/P&gt;

&lt;P&gt;Is the problem only occuring in Debug or Release mode?&lt;/P&gt;

&lt;P&gt;Is the problem occuring in 32 bit mode or 64 bit mode?&lt;/P&gt;

&lt;P&gt;Do the Embree regression tests run through (execute ./regression)?&lt;/P&gt;

&lt;P&gt;We looked again into this code sequence, and in 64 bit mode the&amp;nbsp;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;StackItemInt32&amp;lt;NodeRef&amp;gt; struct is 16 bytes large. Consequently, the code sequence using the SSE loads should by correct.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I could imagine that you ran into some ICC compiler bug. Can you easily upgrade to the latest ICC and rerun the experiment?&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Sven&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2014 12:07:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045929#M463</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2014-11-11T12:07:21Z</dc:date>
    </item>
    <item>
      <title>Hi Sven</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045930#M464</link>
      <description>&lt;P&gt;Hi Sven&lt;/P&gt;

&lt;P&gt;1) Happens in both: Debug and Release&lt;/P&gt;

&lt;P&gt;2) I've tested in 32-bits only, with fix both 32 and 64 works fine,&lt;/P&gt;

&lt;P&gt;3) Sorry, I don;t know what is a regression test&lt;/P&gt;

&lt;P&gt;4) I use ICC 13.0 for OSX (registered user). I'm not very happy with this build but now I can't upgrade to latest (no $)&lt;/P&gt;

&lt;P&gt;Thx for your support&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2014 12:44:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045930#M464</guid>
      <dc:creator>Igor_Igor</dc:creator>
      <dc:date>2014-11-18T12:44:25Z</dc:date>
    </item>
    <item>
      <title>Ok, the issue only occuring</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045931#M465</link>
      <description>&lt;P&gt;Ok, the issue only occuring in the 32 bit version makes sense. We will fix this in the next release.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2014 06:12:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/AVX-crash/m-p/1045931#M465</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2014-11-19T06:12:10Z</dc:date>
    </item>
  </channel>
</rss>

