[LLVMdev] RFC: R600, a new backend for AMD GPUs
Tom Stellard
thomas.stellard at amd.com
Wed Apr 18 11:41:02 PDT 2012
On Mon, Apr 09, 2012 at 10:16:21AM -0400, Tom Stellard wrote:
> On Mon, Apr 09, 2012 at 09:37:37AM -0400, Tom Stellard wrote:
> > On Mon, Mar 26, 2012 at 12:50:07PM -0400, Tom Stellard wrote:
> > > Hi,
> > >
> > > We've been working on an LLVM backend for the previous generation of AMD
> > > GPUs (HD 2XXX - HD 6XXX) and we would like submit it for inclusion in the
> > > main LLVM tree. The latest code can be found in this git repository:
> > > http://cgit.freedesktop.org/~tstellar/llvm/ in the r600-initial-review
> > > branch or if you prefer you can download the entire tree with this link:
> > > http://cgit.freedesktop.org/~tstellar/llvm/snapshot/llvm-r600-initial-review.tar.gz
> > > The R600 backend is located in lib/Target/AMDIL
> > >
> > > First, a brief description of the backend:
> > >
> > > The r600 backend is being developed as a part of the Open Source compute
> > > stack in Mesa (http://www.mesa3d.org/), which uses the Gallium API.
> > > It uses large portions of the AMDIL backend which was open-sourced
> > > last December and you'll notice the TargetMachine for this backend
> > > (AMDGPUTargetMachine) is a sub-class of AMDILTargetMachine. We are also
> > > currently working on an LLVM backend for Southern Islands GPUs, and we
> > > would like to get that code into the LLVM tree as well, once it has been
> > > approved for release. The Southern Islands backend will be used for
> > > compute shaders and also graphics shaders in the AMD open source 3D driver.
> > >
> > > One thing that I would like to point out is that all of the
> > > code from the AMDIL backend is licensed under a BSD license with an
> > > additional clause that deals with United States export laws (non-AMDIL
> > > code is licensed with the University of Illinois Open Source License).
> > > Will the LLVM project accept a backend with code licensed under this BSD
> > > license? We would prefer to keep this license, but if it isn't
> > > acceptable, we can try to relicense it.
> > >
> > > Second, I am looking for two categories of feedback for the r600 backend:
> > >
> > > 1. What changes do I need to make to get the backend included in the LLVM tree.
> > > 2. What changes can I make to improve the backend overall.
> > >
> > > My top priority is to get the backend into the LLVM tree, so
> > > when you provide feedback if you could be clear about what
> > > changes are needed to get the backend into the tree versus what changes
> > > are just general improvements, I would appreciate it.
> > >
> > > Lastly, I did a very brief run through of the code to check the coding style,
> > > but I know there are still some violations. For example, a lot of the
> > > file headers are missing file descriptions. I didn't want to spend a
> > > lot of time on coding style changes prior to the initial review in case
> > > I was asked to make big changes to the code, so I will address these
> > > issues once I have received an OK on the organization of the code.
> > > However, please still point out coding style errors to me, and I'll be
> > > sure to fix them during the final pass.
> > >
> > > Looking forward to your feedback.
> > >
> > > Thanks,
> > > Tom Stellard
> > >
> >
> > Has anyone had a chance to review this code yet? What about the
> > licensing issue? Getting this backend included in LLVM is currently
> > a blocker for the Mesa Open Source compute stack on AMD hardware as
> > well as the Southern Islands Open Source 3D driver, so I would really
> > appreciate it if someone could take a look at the code and let me know what
> > is needed to get it upstream.
>
> I've just received approval to relicense all the code under the
> University of Illinois Open Source License, so this shouldn't be an
> issue any more.
>
Hi,
I'm not sure if anyone has had a chance to look at this yet, but I've
just updated my tree
http://cgit.freedesktop.org/~tstellar/llvm/ r600-initial-review,
with the following changes:
1. Relicensed everything under the University of Illinois Open Source
License
2. Rebased against current LLVM TOT
3. Added Support for Southern Islands GPUs
Looking forward to your feedback.
-Tom
More information about the llvm-dev
mailing list