[llvm-dev] SPIR-V questions
Enrique González via llvm-dev
llvm-dev at lists.llvm.org
Wed Nov 6 01:54:32 PST 2019
Hi Alexey,
Im asking on the github and the SPIR-V forum, I did not know about its
existence, sorry.
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.
El mar., 5 nov. 2019 a las 13:49, Sachkov, Alexey (<alexey.sachkov at intel.com>)
escribió:
> Hi Enrique,
>
>
>
> 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)
>
>
>
> Regarding your questions:
>
>
>
> > 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.
>
> I would suggest to ask this question directly in the SPIRV-Tools project:
> you can either use github or corresponding mailing list, see
> https://www.khronos.org/spir/spirv-tools-mailing-list/
>
>
>
> > 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.
>
> Could you please clarify: you have C++ on host or in the device code?
>
>
>
> > 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.
>
> 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
>
>
>
> *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Enrique
> Gonzalez via llvm-dev
> *Sent:* Tuesday, November 5, 2019 2:31 PM
> *To:* llvm-dev at lists.llvm.org
> *Subject:* Re: [llvm-dev] SPIR-V questions
>
>
>
> 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.
>
>
>
> 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.
>
>
>
> El mar., 5 nov. 2019 a las 11:09, Enrique González (<
> enrike.gonzalez.98 at gmail.com>) escribió:
>
> Dear all,
>
>
>
> I have a couple of questions of SPIR-V implementation for OpenCL.
>
>
>
> 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.
>
>
>
> 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.
>
>
>
>
>
>
>
>
> --
>
> Un saludo
>
>
>
> Enrique González
>
>
> --------------------------------------------------------------------
> Joint Stock Company Intel A/O
> Registered legal address: Krylatsky Hills Business Park,
> 17 Krylatskaya Str., Bldg 4, Moscow 121614,
> Russian Federation
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
--
Un saludo
Enrique González
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191106/aae16a95/attachment.html>
More information about the llvm-dev
mailing list