<div dir="ltr">Hi Zou,<div><br></div><div>Thank you for the quick reply.</div><div><br></div><div>I'm actually looking into the programmer reference manual for Haswell processors,<br><a href="https://01.org/linuxgraphics/documentation/driver-documentation-prms/2013-intel-core-processor-family">https://01.org/linuxgraphics/documentation/driver-documentation-prms/2013-intel-core-processor-family</a><br><br></div><div>Can you point me to the Volume where I can understand the run time environment setup needed?</div><div><br></div><div>Thanks,</div><div>Dushyant</div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 7, 2015 at 1:06 PM, Zou, Nanhai <span dir="ltr"><<a href="mailto:nanhai.zou@intel.com" target="_blank">nanhai.zou@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="ZH-CN" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">         Genx instructions are not directly inserted into batch buffer.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">The batch buffer contains some reference pointer which will finally point to a GPU buffer which contains GPU instructions for a kernel.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">The instruction emit code are located in backend/src/backend/genx_encoder.cpp
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">To execute a kernel,  with only opcode and memory access is not enough.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">There is an entire runtime environment need to be set up.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">To understand those, I suggest you first study hardware spec at
<a href="https://01.org/zh/linuxgraphics/documentation/hardware-specification-prms" target="_blank">
https://01.org/zh/linuxgraphics/documentation/hardware-specification-prms</a><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Zou Nanhai<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div style="border-style:none none none solid;border-left-color:blue;border-left-width:1.5pt;padding:0cm 0cm 0cm 4pt">
<div>
<div style="border-style:solid none none;border-top-color:rgb(181,196,223);border-top-width:1pt;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10pt;font-family:Tahoma,sans-serif">From:</span></b><span lang="EN-US" style="font-size:10pt;font-family:Tahoma,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>Dushyant Behl<br>
<b>Sent:</b> Monday, July 06, 2015 8:49 PM<br>
<b>To:</b> <a href="mailto:beignet@lists.freedesktop.org" target="_blank">beignet@lists.freedesktop.org</a><br>
<b>Subject:</b> [Beignet] Gen7 Instructions Opcode Examples<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Hello Guys,<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">I'm extremely sorry if I mailed to the wrong mailing list. Please forgive me if I've done anything wrong, this is my first message to this mailing list.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">I'm a masters student of computer science, I'm trying to understand the beignet project and how the batch buffers are submitted to the i915 gpu driver.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">I have a problem getting hold of the arithmetic instruction formats of the Intel Gen7 Haswell processors.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt"><span lang="EN-US">Can anyone please help me by pointing me to the location where beignet compiler backend emits compiled instuctions (byte code) in the batchbuffer. <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Also I wanted to ask if is possible to test the execution of one single instruction like ADD/SUB in the batch buffer by writing the opcodes along with some src and dest memory locations directly in batchbuffer rather
 than going through the beignet compiler.<br>
Can anyone please provide me an example of any such instruction?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Dushyant<u></u><u></u></span></p>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div></div>