<div dir="ltr">Hi Xiuli,<div><br></div><div>Thanks for the quick reply!<br><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 25, 2016 at 4:06 AM, Pan, Xiuli <span dir="ltr"><<a href="mailto:xiuli.pan@intel.com" target="_blank">xiuli.pan@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hi Szilárd,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">What do you mean about quoted includes?</span></p></div></div></blockquote><div><br></div><div>I mean -I"/path/to/headers" does not work, but -I/path/to/headers does.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> If you mean the include in kernels, I think we may have some problem with that. The *.cl we used for clang actually was
a copied tmp version stored not in where is used to be. So I think if you just put what need to be included in the old place, clang could not find it. You could try a workaround to pass “-I where/your/header/is” as a build option to clBuildProgram.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Then if you have some double types used on Haswell it may have some problem. The hardware for HSW does not support double very well as we have refined our double
support to hardware then, so HSW may have some issues with double type. If it is not the problem with double float, you can send your kernel as an attachment or report a bug on our Bugzilla(<a href="https://bugs.freedesktop.org" target="_blank">https://bugs.freedesktop.org</a>)
and we will tried to fix it.</span></p></div></div></blockquote><div><br></div><div>No double precision in the kernels. </div><div><br></div><div>For now I'll post here, I feel like a bug report may be an overkill - especially as I can't provide a full repro case that does not involve building the entire application.</div><div><br></div><div>I've attached a minimum set of source files that's needed to compile. We have pretty heavy preprocessor use that generates kernels for the different inputs / outputs / computation combinations, so one particular flavor that's known to produce incorrect results is generated compiling <a href="http://nbnxn_ocl_kernels.cl" target="_blank">nbnxn_ocl_kernels.cl</a> with the following flags:</div><div><br></div><div>-D_WARPLESS_SOURCE_ -DGMX_OCL_FASTGEN -DEL_RF -DEELNAME=_ElecRF -DLJ_COMB_GEOM -DVDWNAME=_VdwLJCombGeom -DCENTRAL=22 -DNBNXN_GPU_NCLUSTER_PER_SUPERCLUSTER=8 -DNBNXN_GPU_CLUSTER_SIZE=8 -DNBNXN_GPU_JGROUP_SIZE=4 -DNBNXN_AVOID_SING_R2_INC=1.0e-12f<br></div><div><br></div><div><div><br></div><div>Additionally I had a closer look and so far I have observed three issues (additional to the minor include issue mentione before):</div><div><br></div><div>1. If I do a manual prefetch into local memory followed by a mem fence (seenbnxn_ocl_kernel_nowarp.clh line 339), I get the following error:</div><div>drm_intel_gem_bo_context_exec() failed: Input/output error<br></div><div>The next kernel call then fails with CL_OUT_OF_RESOURCES.</div><div>Without the manual prefetch it works better, but...</div><div><br></div><div>2. The results produced by the kernel are still somewhat off. It could be that I missed a subtle detail and the kernels still do not conform to the hardware's execution model. I'm very familar with Intel's hardware and these kernels were originally designed for 32/64 wide execution.</div></div><div><br></div><div>3. All task enqueue calls seem to be blocking. </div><div><br></div><div><br></div><div>Thanks & Cheers,</div><div>--</div><div>Szilárd<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Xiuli<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_-1656042802533275351_m_-7178689981159528445_m_4942293989275683479_m_-3267376617165653142_m_-7920876473279506599_m_-6156579930316267796__MailEndCompose"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></a></p>
<p class="MsoNormal"><a name="m_-1656042802533275351_m_-7178689981159528445_m_4942293989275683479_m_-3267376617165653142_m_-7920876473279506599_m_-6156579930316267796______replyseparator"></a><b><span style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif"> Beignet [mailto:<a href="mailto:beignet-bounces@lists.freedesktop.org" target="_blank">beignet-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Szilárd Páll<br>
<b>Sent:</b> Friday, March 25, 2016 7:16 AM<br>
<b>To:</b> <a href="mailto:beignet@lists.freedesktop.org" target="_blank">beignet@lists.freedesktop.org</a><br>
<b>Subject:</b> [Beignet] GROMACS on beignet<u></u><u></u></span></p><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">I am a developer of the GROMACS (<a href="http://www.gromacs.org" target="_blank">www.gromacs.org</a>) molecular dynamics simulation package. We have OpenCL offload for some of the compute-intensive kernels which that works very well on AMD. I wanted to
assess how feasible is to use an Intel iGPU in GROMACS and after jumping through some hoops I got a 4.2 kernel and beignet master installed.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Then I ran into the first minor issue: it seems that beignet does not accept quoted includes although AFAIK the double-quoted include paths should be accepted, but that did not work. No big deal, it doesn't work with Apple's OpenCL either,
but I thought I'd ask.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">However, the bigger issue is that running on Haswell (HD 4600, I think) the kernel produces results that are very off (while the very same source gives correct results on other platforms). I've not much time to dig deeper, but I thought
I'd drop a mail maybe somebody is interested in helping out with tips or even tracking down where the issue is.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Suggestions would be welcome!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Cheers,<br clear="all">
<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">--<br>
Szilárd<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</blockquote></div><br></div></div></div>