<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Justin,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">This backend is for the Open Source linux driver, not the AMD Catalyst OpenCL driver. The backend for AMDIL that I open sourced in December can be used on the APP SDK with
some modifications via calclCompile and can be loaded with a tool that creates ELF files via clCompileProgramFromBinary in OpenCL.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">We are working on making this process more useful, but right now it requires outside tools to work.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Micah<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Justin Holewinski [mailto:justin.holewinski@gmail.com]
<br>
<b>Sent:</b> Friday, May 25, 2012 2:37 PM<br>
<b>To:</b> Tom Stellard<br>
<b>Cc:</b> Stellard, Thomas; Villmow, Micah; llvmdev@cs.uiuc.edu<br>
<b>Subject:</b> Re: [LLVMdev] RFC: R600, a new backend for AMD GPUs<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Tom,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have a higher-level question regarding this back-end. If I have an LLVM IR module and run it through this back-end, it seems like the only output option is a binary format. Is this a device binary, or another intermediate format?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">If the input LLVM IR module was a compute kernel, how would I go about executing it on an AMD GPU? Can I use the APP SDK to load the binary, perhaps through the CAL interfaces? How about the OpenCL binary
interface?<o:p></o:p></p>
<div>
<p class="MsoNormal">On Tue, Apr 24, 2012 at 2:52 PM, Tom Stellard <<a href="mailto:tstellar@gmail.com" target="_blank">tstellar@gmail.com</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal">On Mon, Mar 26, 2012 at 12:50:07PM -0400, Tom Stellard wrote:<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">> Hi,<br>
><br>
> We've been working on an LLVM backend for the previous generation of AMD<br>
> GPUs (HD 2XXX - HD 6XXX) and we would like submit it for inclusion in the<br>
> main LLVM tree. The latest code can be found in this git repository:<br>
> <a href="http://cgit.freedesktop.org/~tstellar/llvm/" target="_blank">http://cgit.freedesktop.org/~tstellar/llvm/</a> in the r600-initial-review<br>
> branch or if you prefer you can download the entire tree with this link:<br>
> <a href="http://cgit.freedesktop.org/~tstellar/llvm/snapshot/llvm-r600-initial-review.tar.gz" target="_blank">
http://cgit.freedesktop.org/~tstellar/llvm/snapshot/llvm-r600-initial-review.tar.gz</a><br>
> The R600 backend is located in lib/Target/AMDIL<br>
><br>
> First, a brief description of the backend:<br>
><br>
> The r600 backend is being developed as a part of the Open Source compute<br>
> stack in Mesa (<a href="http://www.mesa3d.org/" target="_blank">http://www.mesa3d.org/</a>), which uses the Gallium API.<br>
> It uses large portions of the AMDIL backend which was open-sourced<br>
> last December and you'll notice the TargetMachine for this backend<br>
> (AMDGPUTargetMachine) is a sub-class of AMDILTargetMachine. We are also<br>
> currently working on an LLVM backend for Southern Islands GPUs, and we<br>
> would like to get that code into the LLVM tree as well, once it has been<br>
> approved for release. The Southern Islands backend will be used for<br>
> compute shaders and also graphics shaders in the AMD open source 3D driver.<br>
><br>
> One thing that I would like to point out is that all of the<br>
> code from the AMDIL backend is licensed under a BSD license with an<br>
> additional clause that deals with United States export laws (non-AMDIL<br>
> code is licensed with the University of Illinois Open Source License).<br>
> Will the LLVM project accept a backend with code licensed under this BSD<br>
> license? We would prefer to keep this license, but if it isn't<br>
> acceptable, we can try to relicense it.<br>
><br>
> Second, I am looking for two categories of feedback for the r600 backend:<br>
><br>
> 1. What changes do I need to make to get the backend included in the LLVM tree.<br>
> 2. What changes can I make to improve the backend overall.<br>
><br>
> My top priority is to get the backend into the LLVM tree, so<br>
> when you provide feedback if you could be clear about what<br>
> changes are needed to get the backend into the tree versus what changes<br>
> are just general improvements, I would appreciate it.<br>
><br>
> Lastly, I did a very brief run through of the code to check the coding style,<br>
> but I know there are still some violations. For example, a lot of the<br>
> file headers are missing file descriptions. I didn't want to spend a<br>
> lot of time on coding style changes prior to the initial review in case<br>
> I was asked to make big changes to the code, so I will address these<br>
> issues once I have received an OK on the organization of the code.<br>
> However, please still point out coding style errors to me, and I'll be<br>
> sure to fix them during the final pass.<br>
><br>
> Looking forward to your feedback.<br>
><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">Hi,<br>
<br>
Based on some feedback I received on IRC today, it sounds like this<br>
is just too much code to review at once. I'm going to try to strip<br>
the R600 backend down to the bare minimum that is needed for our Mesa<br>
drivers and then repost the code to the list. Hopefully, this will make it<br>
easier for people to review.<br>
<span style="color:#888888"><br>
<span class="hoenzb">-Tom</span></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">
http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Justin Holewinski<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>