jigardhaval8 / gpuocelot

Automatically exported from code.google.com/p/gpuocelot
0 stars 0 forks source link

Add an AMD IL backend #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Describe the New Feature:

At a high level this would be an IR, translator, and executive kernel for
AMD's IL language.

Which milestone does the feature belong to?
2.0.0

Which branch does the new feature go in?
Trunk

Original issue reported on code.google.com by gregory....@gatech.edu on 8 Oct 2009 at 5:47

GoogleCodeExporter commented 8 years ago
Assigned to rod

Original comment by mailsud...@gmail.com on 9 Oct 2009 at 1:53

GoogleCodeExporter commented 8 years ago
What exactly do you expect to do?
I mean I think you want to write a AMD IL backend for having AMD IL-> LLVM.
Would be possible to have AMD IL-> PTX or from PTX->AMD IL?
i.e. you have a way to do LLVM-> PTX or AMD IL->PTX?
Anyway seems that a LLVM->AMD IL is currently avaiable as part of AMD Stream 
2.0 SDK.. 
./llc -regalloc=amdil -filetype=asm -march=amdil kernel.bc -o kernel.il
see http://forums.amd.com/devforum/messageview.cfm?catid=390&threadid=120683&
enterthread=y for details
Also similary as Nvidia OpenCL backend (which uses not yet published PTX spec) 
AMD
OpenCL SDK is using a not yet published AMD IL spec (il_cs_2_0). If you want to 
add
for testing and regression the kernels form OpenCL kernel codes use my wrapper 
(as
currently it doesn't work on on AMD OpenCL the API for getting built device 
binaries)..
The wrapper also gets device assembly code (similar in concept to cubin as PTX 
is
similar to AMD IL in concept)..
see http://oscarbg.blogspot.com/2009/10/cal-wrapper-for-getting-amd-il-from.html

Original comment by oscarbar...@gmail.com on 23 Oct 2009 at 6:29

GoogleCodeExporter commented 8 years ago
Actually the idea is to go from PTX to AMD IL so that we can execute 
pre-compiled
CUDA programs on AMD GPUs.

I was unaware that there was an LLVM to AMD IL backend available as part of the
Stream SDK. Thanks for the info.  We might be able to take advantage of our PTX 
to
LLVM translator, but I am doubtful because we loose a lot of information about 
the
thread hierarchy in PTX when we go to LLVM.

Right now rod is working on this so I will leave it open to him to elaborate.

Original comment by gregory....@gatech.edu on 24 Oct 2009 at 12:54

GoogleCodeExporter commented 8 years ago
Hi oscar,
I have a question regarding your calclwrapper library (from the link above)... 
It's
not working for me. Let me know if you read this post. Thank you.

Original comment by rodrigo.d.dominguez@gmail.com on 11 Mar 2010 at 12:12

GoogleCodeExporter commented 8 years ago
Hi, I am new, can someone explain what exactly are you going to do in this 
issue?
I am wondering how do you get LLVM to generate code to run on AMD GPU? The AMD 
IL Bankend is not open source.

Original comment by juvesea...@gmail.com on 18 Apr 2011 at 8:43

GoogleCodeExporter commented 8 years ago
The AMD GPU backend translates PTX directly into IL. This paper describes the 
implementation details: http://doi.acm.org/10.1145/1964179.1964186. You can 
find documentation about the AMD IL at 
http://developer.amd.com/gpu/AMDAPPSDK/documentation.

Original comment by rodrigo.d.dominguez@gmail.com on 18 Apr 2011 at 1:17

GoogleCodeExporter commented 8 years ago

Original comment by gregory....@gatech.edu on 23 Jun 2011 at 10:05

GoogleCodeExporter commented 8 years ago
Just a FYI,
 AMD open sourced its backend in December. This might help with what you are attempting to do.
http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-December/046136.html

Original comment by villmow on 15 Mar 2012 at 5:37