<?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 Re: Performance issues with TBB 2021.1.1 in Intel® Embree Ray Tracing Kernels</title>
    <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261442#M900</link>
    <description>&lt;P&gt;I have a parallel discussion of the issue going on the TBB github site.&amp;nbsp; This comment I posted there in particular might be useful information here as well:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/oneapi-src/oneTBB/issues/355#issuecomment-790674138" target="_blank"&gt;https://github.com/oneapi-src/oneTBB/issues/355#issuecomment-790674138&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I am fairly convinced now this is not a build issue.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Mar 2021 14:57:07 GMT</pubDate>
    <dc:creator>Mike_M_6</dc:creator>
    <dc:date>2021-03-04T14:57:07Z</dc:date>
    <item>
      <title>Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261123#M894</link>
      <description>&lt;DIV class="js-discussion js-socket-channel ml-0 pl-0 ml-md-6 pl-md-3" data-channel="eyJjIjoibWFya2VkLWFzLXJlYWQ6MzI1MTU2NDkiLCJ0IjoxNjE0ODAxMDMxfQ==--953f5f32fd8ee84cd027d4309d2a9a9ec621cbb4cdaa53eb3c8c31f213748b1e" data-channel-target="MDU6SXNzdWU4MjEzOTYzNzA="&gt;
&lt;DIV class="TimelineItem pt-0 js-comment-container js-socket-channel js-updatable-content" data-gid="MDU6SXNzdWU4MjEzOTYzNzA=" data-url="/_render_node/MDU6SXNzdWU4MjEzOTYzNzA=/issues/body?variables%5BdeferredCommentActions%5D=true" data-channel="eyJjIjoiaXNzdWU6ODIxMzk2MzcwIiwidCI6MTYxNDgwMTAzMX0=--e53b225e7d38021234d3cfe0d3369f8916f8a867d11edda896622dbb79d4eb92"&gt;
&lt;DIV id="issue-821396370" class=" timeline-comment-group js-minimizable-comment-group js-targetable-element TimelineItem-body my-0 "&gt;
&lt;DIV class="ml-n3 timeline-comment unminimized-comment comment previewable-edit js-task-list-container editable-comment js-comment timeline-comment--caret reorderable-task-lists current-user" data-body-version="cf8e0de7a666365507803893cc108447d697ebf686cf0ba7b2cd6e66bd7ee65b" data-unfurl-hide-url="/content_reference_attachments/hide"&gt;
&lt;DIV class="edit-comment-hide"&gt;
&lt;DIV class="js-discussion js-socket-channel ml-0 pl-0 ml-md-6 pl-md-3" data-channel="eyJjIjoibWFya2VkLWFzLXJlYWQ6MzI1MTU2NDkiLCJ0IjoxNjE0ODAxMDMxfQ==--953f5f32fd8ee84cd027d4309d2a9a9ec621cbb4cdaa53eb3c8c31f213748b1e" data-channel-target="MDU6SXNzdWU4MjEzOTYzNzA="&gt;
&lt;DIV class="TimelineItem pt-0 js-comment-container js-socket-channel js-updatable-content" data-gid="MDU6SXNzdWU4MjEzOTYzNzA=" data-url="/_render_node/MDU6SXNzdWU4MjEzOTYzNzA=/issues/body?variables%5BdeferredCommentActions%5D=true" data-channel="eyJjIjoiaXNzdWU6ODIxMzk2MzcwIiwidCI6MTYxNDgwMTAzMX0=--e53b225e7d38021234d3cfe0d3369f8916f8a867d11edda896622dbb79d4eb92"&gt;
&lt;DIV id="issue-821396370" class=" timeline-comment-group js-minimizable-comment-group js-targetable-element TimelineItem-body my-0 "&gt;
&lt;DIV class="ml-n3 timeline-comment unminimized-comment comment previewable-edit js-task-list-container editable-comment js-comment timeline-comment--caret reorderable-task-lists current-user" data-body-version="cf8e0de7a666365507803893cc108447d697ebf686cf0ba7b2cd6e66bd7ee65b" data-unfurl-hide-url="/content_reference_attachments/hide"&gt;
&lt;DIV class="edit-comment-hide"&gt;
&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;&lt;/SPAN&gt;have an embree-3.12.2-based application (built on ubuntu 18.04) where if I update tbb from 2020.3 to 2021.1.1, the throughput performance drops significantly (I would estimate up to an order of magnitude slower) when under load. It is very consistent and obvious.&lt;/P&gt;
&lt;P&gt;Both tbb and embree are rebuilt locally from scratch. The only application source code changed during the migration is the removal of the usage of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;tbb::task_scheduler_init&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;during the initialization phase, which I have understood was effectively non-functional anyway.&lt;/P&gt;
&lt;P&gt;Any ideas/recommendations?&lt;/P&gt;
&lt;P&gt;If it helps here's what embree logs under 2021.1.1:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;Embree Ray Tracing Kernels 3.12.2 ()
Compiler : GCC 7.5.0
Build : Release
Platform : Linux (64bit)
CPU : Xeon Sky Lake (GenuineIntel)
Threads : 36
ISA : XMM YMM ZMM SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AVX F16C RDRAND AVX2 FMA3 LZCNT BMI1 BMI2 AVX512F AVX512DQ AVX512CD AVX512BW AVX512VL
Targets : SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVXI AVX2 AVX512
MXCSR : FTZ=1, DAZ=1
Config
Threads : default
ISA : XMM YMM ZMM SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AVX F16C RDRAND AVX2 FMA3 LZCNT BMI1 BMI2 AVX512F AVX512DQ AVX512CD AVX512BW AVX512VL
Targets : SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVXI AVX2 AVX512 (supported)
SSE2 SSE4.2 AVX AVX2 (compile time enabled)
Features: intersection_filter
Tasking : TBB2021.1 TBB_header_interface_12010 TBB_lib_interface_12010

&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Mar 2021 19:58:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261123#M894</guid>
      <dc:creator>Mike_M_6</dc:creator>
      <dc:date>2021-03-03T19:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261134#M895</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;thanks for reporting this. A performance regression of an order of magnitude sounds really serious. Is this affecting the BVH build performance or the BVH traversal performance (ray intersection) or both?&lt;/P&gt;
&lt;P&gt;Can you please double check your results and make sure that you build in release mode both times? I'll try to reproduce this on our side in the meanwhile.&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 20:22:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261134#M895</guid>
      <dc:creator>FlorianR_Intel</dc:creator>
      <dc:date>2021-03-03T20:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261148#M896</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;The BVH build performance is not obviously a problem, but ray intersection is clearly a bottleneck.&lt;/P&gt;
&lt;P&gt;Now that you mention it, the cmake command used for the 2021.1.1 build was:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;cmake ../oneTBB-${TBB_VERSION}/ -DCMAKE_CXX_STANDARD=14 &lt;/LI-CODE&gt;
&lt;P&gt;... whereas previously that command didn't exist because the build wasn't cmake based -- just a simple &lt;FONT face="andale mono,times"&gt;make&lt;/FONT&gt; invocation.&lt;/P&gt;
&lt;P&gt;I will try:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;cmake ../oneTBB-${TBB_VERSION}/ -DCMAKE_CXX_STANDARD=14 -DTBB_TEST=OFF -DCMAKE_BUILD_TYPE=Release&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;... and see if that makes any difference.&lt;/P&gt;
&lt;P&gt;That said, the &lt;A href="https://github.com/oneapi-src/oneTBB/blob/4523a7615eaed49c4ed75654b349ca41b92c6381/CMakeLists.txt#L113" target="_self"&gt;default&lt;/A&gt; build type should work in theory...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 20:43:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261148#M896</guid>
      <dc:creator>Mike_M_6</dc:creator>
      <dc:date>2021-03-03T20:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261159#M897</link>
      <description>&lt;P&gt;The default build type is not equivalent to Release. If you don't specify a build type there will be no optimization flags used. See, for example, &lt;A href="https://blog.kitware.com/cmake-and-the-default-build-type/" target="_blank"&gt;https://blog.kitware.com/cmake-and-the-default-build-type/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've run some tests specifically comparing tbb 2020.3 and oneTBB 2021.1.1 on two different machines (CentOS 7.4, gcc, dual socket Xeon and Ubuntu 2020.4, clang, 16 core Skylake)&amp;nbsp; and I see no performance impact on the ray tracing performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My hypothesis is that you have some issue in your config/build setup. If you still think that this is an Embree issue, please provide some more details about your machine and the compiler you use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW: With oneTBB you can now build TBB and Embree conveniently by adding them as subdirectories/submodules to your project and use add_subdirectory in CMake. Just be sure to first add_subdirectory(path_to_tbb) and then add_subdirectory(path_to_embree). TBB then defines CMake targets that will be picked up and used by Embree for compilation and so forth.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 21:07:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261159#M897</guid>
      <dc:creator>FlorianR_Intel</dc:creator>
      <dc:date>2021-03-03T21:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261162#M898</link>
      <description>&lt;P&gt;Sorry, ignore my comment about the default build type. I did not see the link you provided.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 21:09:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261162#M898</guid>
      <dc:creator>FlorianR_Intel</dc:creator>
      <dc:date>2021-03-03T21:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261170#M899</link>
      <description>&lt;P&gt;Interestingly, my ray-tracing unit tests crash now having switched to the `Release` tbb build configuration.&amp;nbsp; These tests have been used for a couple of years now -- I've not seen them crash like this before.&amp;nbsp; The plot thickens...&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 21:32:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261170#M899</guid>
      <dc:creator>Mike_M_6</dc:creator>
      <dc:date>2021-03-03T21:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261442#M900</link>
      <description>&lt;P&gt;I have a parallel discussion of the issue going on the TBB github site.&amp;nbsp; This comment I posted there in particular might be useful information here as well:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/oneapi-src/oneTBB/issues/355#issuecomment-790674138" target="_blank"&gt;https://github.com/oneapi-src/oneTBB/issues/355#issuecomment-790674138&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I am fairly convinced now this is not a build issue.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 14:57:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261442#M900</guid>
      <dc:creator>Mike_M_6</dc:creator>
      <dc:date>2021-03-04T14:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261446#M901</link>
      <description>&lt;P&gt;OK, thank you!&lt;/P&gt;
&lt;P&gt;This seems to be a TBB issue fundamentally.&lt;/P&gt;
&lt;P&gt;Are you fine with closing this thread and continue the discussion on the TBB github issue tracker?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 15:10:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261446#M901</guid>
      <dc:creator>FlorianR_Intel</dc:creator>
      <dc:date>2021-03-04T15:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261474#M902</link>
      <description>&lt;P&gt;Ha, that's a complicated question...&amp;nbsp; &lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;
&lt;P&gt;About that unit test crash that I mentioned earlier...&lt;/P&gt;
&lt;P&gt;*That* problem appears to be related to the use of ISPC 1.15.0.&amp;nbsp; When I revert back to ISPC 1.13.0 (and leaving everything else unchanged), the crash goes away.&amp;nbsp; I verified the crash occurs in our ISPC code but little insight into why it crashes exactly.&amp;nbsp; These unit tests have not changed significantly in months, and the code has been very stable in production for longer.&lt;/P&gt;
&lt;P&gt;I did not mention the ISPC version until now because I didn't think it was pertinent -- we upgraded to ISPC 1.15.0 at the same time as the TBB 2021.1.1 upgrade.&amp;nbsp; I verified that the TBB behavior was the same with and without the ISPC change and so I assumed it was not an issue by itself.&amp;nbsp; And then that unit test started crashing and now I don't know what to think...&lt;/P&gt;
&lt;P&gt;I'm sure at this point you're probably thinking I must be some kind of idiot but I'm really trying to be as diligent about this as possible.&amp;nbsp; &amp;nbsp;It's true that we changed two dependencies (TBB and ISPC) at the same time, but reverting only one of the dependencies seems to only fix about half of the issues.&amp;nbsp; If I revert both, (it appears) all of the issues are resolved.&lt;/P&gt;
&lt;P&gt;For the time being, I'm reverting back to ISPC 1.13.0 because I can only deal with one problem at a time (assuming there are two problems!).&amp;nbsp; But eventually, it would be nice to get to the bottom of the ISPC issue as well...&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 17:00:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261474#M902</guid>
      <dc:creator>Mike_M_6</dc:creator>
      <dc:date>2021-03-04T17:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261480#M903</link>
      <description>&lt;P&gt;I see now in the TBB issue thread linked above that the unit test crash might be related to issues with the TBB &lt;FONT face="andale mono,times"&gt;Release&lt;/FONT&gt; build configuration -- sticking to the default &lt;FONT face="andale mono,times"&gt;ReleaseWithDebugInfo&lt;/FONT&gt; configuration is the recommended workaround.&amp;nbsp; When/if I get some time/energy to investigate, I will look into this further.&lt;/P&gt;
&lt;P&gt;With that, it is probably okay to close this thread.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your attention.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 17:11:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261480#M903</guid>
      <dc:creator>Mike_M_6</dc:creator>
      <dc:date>2021-03-04T17:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues with TBB 2021.1.1</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261484#M904</link>
      <description>&lt;P&gt;Thanks! We will check if we can reproduce issues with ISPC 1.15 on the Embree side.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 17:18:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/Performance-issues-with-TBB-2021-1-1/m-p/1261484#M904</guid>
      <dc:creator>FlorianR_Intel</dc:creator>
      <dc:date>2021-03-04T17:18:12Z</dc:date>
    </item>
  </channel>
</rss>

