[LLVMdev] "SPIR" ? A Standard Portable IR for OpenCL Kernel Language
vadve at illinois.edu
Thu Sep 6 15:51:40 PDT 2012
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.
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).
> 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?
> **** 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.
Professor, Computer Science
University of Illinois at Urbana-Champaign
More information about the llvm-dev