[LLVMdev] "SPIR" ? A Standard Portable IR for OpenCL Kernel Language

Vikram Adve vadve at illinois.edu
Thu Sep 6 16:08:46 PDT 2012


Thanks, Micah.  All of that makes sense, and I look forward to seeing the specification (as well as getting my hands on an implementation subsequently).

--Vikram
Professor, Computer Science
University of Illinois at Urbana-Champaign
http://llvm.org/~vadve




On Sep 6, 2012, at 6:05 PM, Villmow, Micah wrote:

> 
> 
>> -----Original Message-----
>> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
>> On Behalf Of Vikram Adve
>> Sent: Thursday, September 06, 2012 3:52 PM
>> To: llvmdev at cs.uiuc.edu
>> Subject: Re: [LLVMdev] "SPIR" ? A Standard Portable IR for OpenCL
>> Kernel Language
>> 
>> On Sep 6, 2012, at 4:33 PM, "Ouriel, Boaz" <boaz.ouriel at intel.com>
>> wrote:
>> 
>>> **** Introduction ****
>>> Lately, Khronos has ratified a new provisional specification which is
>> called SPIR.
>>> This specification standardizes an intermediate representation for
>> the OpenCL kernel language.
>>> It is based on LLVM infrastructure and this is why I am sending this
>> mail to the LLVM mailing list.
>>> Khronos members would like to initiate a review on the specification
>> with the LLVM community.
>> 
>> Hi Boaz,
>> 
>> I am glad to hear that this OpenCL effort has made enough progress for
>> you to be ready to share the details with the community.  I think it
>> would be mutually beneficial to both the OpenCL world and to the LLVM
>> community to have an LLVM-based persistent IR for OpenCL programs.
>> 
>> 
>>> The due diligence includes full implementation of the specification
>> by a few members within Khronos.
>> 
>> As you release the SPIR specification, will you also make one or more
>> of these implementations available to the community?  That would be
>> valuable to explore details that may not be obvious from the spec.
>> Executable versions of such an implementation should be good enough --
>> source code doesn't seem necessary (I think, but others may disagree).
> [Villmow, Micah] There are plans for sample implementation that is based on clang
> To be released, but I don't know of the exact time frame. I do know that
> we want to have things released earlier rather than later, but not so early
> that the community does not have a chance to digest the specification beforehand.
>> 
>> 
>> 
>>> The second aspect is the legal part which prevented Khronos from
>> sharing this information publicly until the specification is ratified
>> inside Khronos.
>>> The current version of SPIR specification which is shared with LLVM
>> community is a provisional specification.
>>> The main goal of this version of the specification is to collect
>> feedback from LLVM community, apply the changes and shape the
>> specification to its final version.
>> 
>> Do you have a rough timeline in which you would like to accomplish
>> this?
> [Villmow, Micah] Again, not an exact date, but earlier rather than later is preferable.
> That being said, it is highly dependent on the feedback that the SPIR WG receives and the 
> discussions that are sure to come.
>> 
>> 
>>> 
>>> **** Suggested Topics to discuss ****
>>> 
>>> This is the list of suggested topics to discuss:
>>> 1.    SPIR specification introduction and scope (this mail)
>>> 2.    SPIR Portability
>>>    a.    32 / 64bits architectures (pointers, size_t, ptrdiff_t,
>> intptr_t, uintptr_t)
>>>    b.    Endianness in OpenCL ?C?
>>> 3.    OpenCL built-ins in SPIR
>>>    a.    OpenCL Built-ins & LLVM Built-ins
>>>    b.    Name Mangling
>>> 4.    OpenCL Metadata Arrangement
>>> 5.    OpenCL Specific items
>>>   a.    OpenCL special data types (events, images, samplers) as
>> opaque data types
>>>   b.    Null and zeroinitializer
>>>   c.    Local Memory and alloca?s
>>>   d.    Others
>> 
>> 
>> I am surprised not to see other topics on this list, e.g., features
>> related to parallelism, and also related to support for non-GPU
>> targets.  I suppose we will learn more about what topics need to be
>> discussed when you release the specification.  Looking forward to it.
> [Villmow, Micah] SPIR really is a portable binary representation of OpenCL C 
> at its core, and so if things are not in OpenCL C, then they won't be part of SPIR.
> While that isn't to say that SPIR cannot be expanded, which I'm sure others
> might want to do, it isn't part of the original scope of our work.
>> 
>> --Vikram
>> Professor, Computer Science
>> University of Illinois at Urbana-Champaign
>> 
>> 
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 





More information about the llvm-dev mailing list