<div dir="ltr">Hi Alexey,<div><br></div><div>Im asking on the github and the SPIR-V forum, I did not know about its existence, sorry.</div><div><br></div><div>About the C++ question, I refer to the language of the host code. The Intel OpenCL examples uses C++ host and compiles the OpenCL kernel code inside by its source code. The question is that, in C host, I can easily change the code to compile the OpenCL kernel from SPIR-V compiled file instead of the source code, but in C++ I do not find how to do the same, I do not understand how the host compiles and builds the kernel.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar., 5 nov. 2019 a las 13:49, Sachkov, Alexey (<<a href="mailto:alexey.sachkov@intel.com">alexey.sachkov@intel.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-2142233283320335077WordSection1">
<p class="MsoNormal">Hi Enrique,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Not sure that llvm-dev is the best place to ask about SPIR-V since SPIR-V is not a part of LLVM. There are some LLVM-based projects related to the SPIR-V (SPIRV-LLVM-Translator, SPIRV-Tools), but they are still out-of-tree (by design or
 not)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regarding your questions:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">> The first one is about the tool spirv-opt from the project SPIRV-TOOLS. When you use that tool like "spirv-opt test.spv -o test.spv", it changes something at the file or it does not do anything by not using any flag? I think it is like
 a "No action" flag but I am not 100% sure about that.<br>
<br>
I would suggest to ask this question directly in the SPIRV-Tools project: you can either use github or corresponding mailing list, see
<a href="https://www.khronos.org/spir/spirv-tools-mailing-list/" target="_blank">https://www.khronos.org/spir/spirv-tools-mailing-list/</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">> The second doubt is about C++ with OpenCL. I have seen that at a C host code, if you want to compile a SPIRV file instead of the source code, you can use createProgramWithIL. I am trying now to use something similar at C++ but I do notfind
 anything.<br>
<br>
Could you please clarify: you have C++ on host or in the device code?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">> There is something similar with the llvm opt command: the use of the flag '-analyze' gives you the metric of the bytecode used as input. I need something equivalent but for SPIRV files.<br>
<br>
I would suggest to redirect this question to SPIRV-Tools too. AFAIK, there is no such functionality in SPIRV-LLVM-Translator and I’m not so familiar with other SPIR-V related tools to comment there<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><a name="m_-2142233283320335077______replyseparator"></a><b>From:</b> llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>>
<b>On Behalf Of </b>Enrique Gonzalez via llvm-dev<br>
<b>Sent:</b> Tuesday, November 5, 2019 2:31 PM<br>
<b>To:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm-dev] SPIR-V questions<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Also, i have another question. I need SPIRV metrics to make abstractions for a project, because I am using iteratively flags for evaluating different changes, in different order, so I need to know how the code have change, and I can see
 that "change" with their metrics.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">There is something similar with the llvm opt command: the use of the flag '-analyze' gives you the metric of the bytecode used as input. I need something equivalent but for SPIRV files.<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">El mar., 5 nov. 2019 a las 11:09, Enrique González (<<a href="mailto:enrike.gonzalez.98@gmail.com" target="_blank">enrike.gonzalez.98@gmail.com</a>>) escribió:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Dear all,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have a couple of questions of SPIR-V implementation for OpenCL.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The first one is about the tool spirv-opt from the project SPIRV-TOOLS. When you use that tool like "spirv-opt test.spv -o test.spv", it changes something at the file or it does not do anything by not using any flag? I think it is like
 a "No action" flag but I am not 100% sure about that.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The second doubt is about C++ with OpenCL. I have seen that at a C host code, if you want to compile a SPIRV file instead of the source code, you can use createProgramWithIL. I am trying now to use something similar at C++ but I do notfind
 anything.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<p class="MsoNormal">Un saludo<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">Enrique González<u></u><u></u></p>
</div>
<p><br>--------------------------------------------------------------------<br>Joint Stock Company Intel A/O<br>Registered legal address: Krylatsky Hills Business Park, <br>17 Krylatskaya Str., Bldg 4, Moscow 121614, <br>Russian Federation</p><p>This e-mail and any attachments may contain confidential material for<br>the sole use of the intended recipient(s). Any review or distribution<br>by others is strictly prohibited. If you are not the intended<br>recipient, please contact the sender and delete all copies.</p>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Un saludo<div><br></div><div>Enrique González</div></div>