Generating Cuda Codes an finding specific bytecodes

Christian Thalinger christian.thalinger at oracle.com
Mon Apr 4 18:45:32 UTC 2016


> On Apr 3, 2016, at 3:31 AM, Bahram Yarahmadi <bahram.yarahmadi at gmail.com> wrote:
> 
> Thanks a lot 
> Right now ,I want to focus on sumatra project,
> I wanted to build sumatra but I got some errors:
> Exception in thread "main" java.lang.VerifyError: class jdk.nashorn.internal.objects.ScriptFunctionImpl overrides final method setPrototype.(Ljava/lang/Object;)V
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
> 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
> 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
> 	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> 	at jdk.nashorn.internal.tools.nasgen.StringConstants.<clinit>(StringConstants.java:85)
> 	at jdk.nashorn.internal.tools.nasgen.MemberInfo.verify(MemberInfo.java:250)
> 	at jdk.nashorn.internal.tools.nasgen.ScriptClassInfo.verify(ScriptClassInfo.java:227)
> 	at jdk.nashorn.internal.tools.nasgen.Main.process(Main.java:108)
> 	at jdk.nashorn.internal.tools.nasgen.Main.processAll(Main.java:88)
> 	at jdk.nashorn.internal.tools.nasgen.Main.main(Main.java:62)
> make[1]: *** [/home/bahram/sumatra-dev/build/linux-x86_64-normal-server-release/nashorn/classes/_the.nasgen.run] Error 1
> 
> How can I fix it ?

Personally I’ve never built the sumatra workspace myself.  Maybe someone from AMD can remember some details.

> I have some questions 
> It's not feasible to write our backend for Graal (I mean I generate PTX directly from Graal IR)?

“Not feasible”?  Yes, the PTX backend generates PTX instructions directly from Graal IR and I believe that’s the way to do it.

> I want to know your idea about it !
> 
> Thanks
> 
> On Mon, Mar 28, 2016 at 9:55 PM, Christian Thalinger <christian.thalinger at oracle.com <mailto:christian.thalinger at oracle.com>> wrote:
> 
>> On Mar 25, 2016, at 1:37 AM, Bahram Yarahmadi <bahram.yarahmadi at gmail.com <mailto:bahram.yarahmadi at gmail.com>> wrote:
>> 
>> Thanks
>> but Christian ,as you know,in Sumatra Project the intermediate code is HSAIL and there is no GPU backend for HSAIL yet,We have to use simulators
>> I want to generate PTX or high level CUDA code directly 
> 
> Sumatra also has a PTX backend.  Look at the changeset we pointed you at, e.g.:
> 
> http://hg.openjdk.java.net/graal/graal-compiler/file/c8fc6e2d128b/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx <http://hg.openjdk.java.net/graal/graal-compiler/file/c8fc6e2d128b/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx>
> 
>> 
>> Thanks again 
>> 
>> Ragards
>> 
>> On Thu, Mar 24, 2016 at 4:50 PM, Christian Thalinger <christian.thalinger at oracle.com <mailto:christian.thalinger at oracle.com>> wrote:
>> Last time we pointed you to the Sumatra project and the Graal changeset which contained the PTX and HSAIL backends before they got removed.  I highly suggest to use that version to go forward.
>> 
>> Also, if you are seriously interested in working on Sumatra I would use the sumatra-dev mailing list to ask questions (bcc’ing graal-dev).  A good first step and excellent learning opportunity would be to bring the Sumatra changes to the current Graal version.
>> 
>> Here is a list of people who have been involved in Project Sumatra in the past:
>> 
>> http://openjdk.java.net/census#sumatra <http://openjdk.java.net/census#sumatra>
>> 
>> > On Mar 24, 2016, at 12:29 AM, Bahram Yarahmadi <bahram.yarahmadi at gmail.com <mailto:bahram.yarahmadi at gmail.com>> wrote:
>> >
>> > Dear all,
>> > These days I'm working and learning graal and as you know,I want to run
>> > Java 8 Stream APIs with Lambdas on GPUs
>> > I followed  tutorial on the website but It was useless
>> > I have a few questions
>> > should I change the graal source repository and build it again with mx
>> > build command.For example in which class should I change my modification in
>> > order to change the specific bytecode (for example invocDynamic which is
>> > for lambdas) to graal IR ?
>> > How can I read Bytecodes and convert them to Graal IR?
>> > After that I want to apply come Optimizations
>> > would you mind giving me some hints ? (for example in which class should I
>> > focus and things like that )
>> >
>> > Thanks in advance
>> >
>> > Regards
>> 
>> 
> 
> 



More information about the sumatra-dev mailing list