Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Java Programming

Rootbeer GPU Compiler Lets Almost Any Java Code Run On the GPU 304

An anonymous reader writes "Today the source code to the Rootbeer GPU Compiler was released as open source on github. This work allows for a developer to use almost any Java code on the GPU. It is free, open source and highly tested. Rootbeer is the most full featured translator to convert Java Bytecode to CUDA. It allows arbitrary graphs of objects to be serialized to the GPU and the GPU kernel to be written in Java." Rootbeer is the work of Syracuse University instructor Phil Pratt-Szeliga.
This discussion has been archived. No new comments can be posted.

Rootbeer GPU Compiler Lets Almost Any Java Code Run On the GPU

Comments Filter:
  • x264 (Score:4, Interesting)

    by girlintraining ( 1395911 ) on Saturday August 11, 2012 @11:31PM (#40961773)
    Maybe now the x264 developers will add GPU support and we'll finally have a solution for video encoding that uses the processor and GPUs in parallel. Here's to hoping... :\
  • Re:Any code? (Score:2, Interesting)

    by XxtraLarGe ( 551297 ) on Sunday August 12, 2012 @12:00AM (#40961917) Journal
    The problem with No Worker Left behind is it tried to wedge non-techinically inclined stampers and tool & dye operators into technical classes because "there's jobs in computers." The day after my one of my Winter courses finished, one of my less than stellar students started a job as a welder. He told me he was just waiting for a job to come along, he had no intention in going into programming. I have another one just like that this semester.

    "Thinking is hard work, which is why so few people do it." - Henry Ford

  • by SplashMyBandit ( 1543257 ) on Sunday August 12, 2012 @12:05AM (#40961959)

    This is simply not true for code written by a professional and competent Java developer (note: part of my consulting gig means I code Java on a professional basis).

    If you write only to the public APIs then Java truly is Write-Once-Run-Anywhere (although some bad Java developers use internal functionality that can change between Java versions - I'm guessing that perhaps these folks are used to coding to the Undocumented APIs of Win32 that you used to have to use to get things done). In Java you shouldn't do this. IIRC, Sun created around ten thousand unit tests to ensure Java worked correctly on each platform (wonderful, they did all the porting and port testing effort so Java developers don't have to).

    Aside from my professional coding (where Java written on a Mac works flawlessly when deployed to Linux and Windows servers) in my spare time I'm working on modern jet air combat simulator in Java. The same Java+JoGL code works flawlessly on Mac, Linux and Windows. Any differences are in capabilities/performance of individual graphics cards (AMD/ATI vs NVidia).

    This article about being able to write Java for the GPU is very interesting, since writing shaders via OpenGL is a little bit of a PITA (there is an impedance mismatch between the conventions of Java, OpenGL and GLSL - it would be fabulous to just write in Java [akin to how I can do this on the Web using Google Web Toolkit]).

    So I don't think your statement is really true - except for buggy software written by developers who have bad simple-platform habits.

  • Blah its CUDA (Score:5, Interesting)

    by zixxt ( 1547061 ) on Sunday August 12, 2012 @12:19AM (#40962015)

    It's CUDA only, meaning it does not support any open standards. Call me when when I can target OpenCL.

  • Re:Any code? (Score:4, Interesting)

    by danbuter ( 2019760 ) on Sunday August 12, 2012 @12:40AM (#40962129)
    He'll make far more money welding than most IT guys will. And he'll get a great pension, as long as he joins a welders union (which he probably will, unless you are way out in the boonies).
  • Re:x264 (Score:3, Interesting)

    by girlintraining ( 1395911 ) on Sunday August 12, 2012 @01:27AM (#40962303)

    That would be quite difficult for a C/assembly project to use a Java compiler.

    *shrug* They've been dragging their heels for years, claiming that there's no practical way to do it, that the quality is inferior, etc., etc. And now there's a way to generate bytecode that can be executed on the GPU and return predictable results. I'm sure someone who knows assembler can figure out a simple FIFO or IPC / shared memory arrangement... At this point, they can't hide behind technical hurdles: It's clear GPUs can be used, they just don't want to because they're stuck up.

  • by eWarz ( 610883 ) on Sunday August 12, 2012 @01:38AM (#40962347)

    This is simply not true for code written by a professional and competent Java developer (note: part of my consulting gig means I code Java on a professional basis).

    If you write only to the public APIs then Java truly is Write-Once-Run-Anywhere (although some bad Java developers use internal functionality that can change between Java versions - I'm guessing that perhaps these folks are used to coding to the Undocumented APIs of Win32 that you used to have to use to get things done). In Java you shouldn't do this. IIRC, Sun created around ten thousand unit tests to ensure Java worked correctly on each platform (wonderful, they did all the porting and port testing effort so Java developers don't have to).

    Aside from my professional coding (where Java written on a Mac works flawlessly when deployed to Linux and Windows servers) in my spare time I'm working on modern jet air combat simulator in Java. The same Java+JoGL code works flawlessly on Mac, Linux and Windows. Any differences are in capabilities/performance of individual graphics cards (AMD/ATI vs NVidia).

    This article about being able to write Java for the GPU is very interesting, since writing shaders via OpenGL is a little bit of a PITA (there is an impedance mismatch between the conventions of Java, OpenGL and GLSL - it would be fabulous to just write in Java [akin to how I can do this on the Web using Google Web Toolkit]).

    So I don't think your statement is really true - except for buggy software written by developers who have bad simple-platform habits.

    I would tend to disagree. Why? Because companies like cisco, ibm, etc. all only certify certain versions of java for use in their applications. The cisco apps are cross platform but do NOT play well with different versions of java. I'm not a java expert (I'm a C#/RoR guy) but if fortune 500 companies can't get it right, can you really say that java is cross version compatible?

  • Re:Blah its CUDA (Score:5, Interesting)

    by SecondaryOak ( 1342441 ) on Sunday August 12, 2012 @03:03AM (#40962653)
    Are you positive it's CUDA only? Browsing the code it does seem to have an OpenCL "backend", at https://github.com/pcpratts/rootbeer1/tree/master/src/edu/syr/pcpratts/rootbeer/generate/opencl [github.com]
  • Re:x264 (Score:3, Interesting)

    by Anonymous Coward on Sunday August 12, 2012 @04:11AM (#40962829)

    If you've been following x264 development at all, you'd know that all coders which attempted to add complete GPU acceleration to x264 either failed or have given up because it was too difficult. Their motto has always been 'patches welcome', but the result can't be slower than x264 on a CPU or degrade quality significantly. Thus far not really an issue, since off-hand I can't think of anybody who was actually able to provide a patch which was able to be compiled and produce valid output, let alone have acceptable speed or quality.

    Recently the x264 team was working with an AMD commissioned engineer, yet the only useful thing AMD was able to produce was OpenCL motion compensation, which should land in x264 mainline in the near future. It's not a question of them not wanting GPU acceleration or being stuck up, they literally have been unable to find coders who are knowledgeable and dedicated enough with OpenCL/CUDA to actually produce useful patches. Many of x264 algorithms aren't well suited to the GPU, and as everyone who has attempted this so far has realized, it's no easy task to come close to x264's level of quality on a GPU, while still being faster than the CPU.

  • c- java simple (Score:3, Interesting)

    by gl4ss ( 559668 ) on Sunday August 12, 2012 @05:12AM (#40963025) Homepage Journal

    yeah, you can even automate it..

    now, I wonder if this gpu project could be used to run http://www.ode4j.org/ [ode4j.org] ..(ode for java is a port of a c/c++ physics lib to java, mostly automated conversion. it actually works pretty nicely.)

  • Re:Any code? (Score:5, Interesting)

    by Charliemopps ( 1157495 ) on Sunday August 12, 2012 @07:49AM (#40963423)
    Being a former certified welder, and now a programmer I can tell you that:
    a. I was a GREAT welder. Certified in everything save underwater stuff... I got about $13/hr
    b. I'm not a very good programmer. I just started, don't know many languages and am always bugging my coworkers with noob questions. Now I'm salaried at $60k/yr

    So, I'm not sure how much you think welders get paid. But it's not much. I'm sure there are a few (like the under water guys and the skyscraper guys) but the vast majority of us sitting in machine shops with no aircon, welding liftgates on the back of semis are not making a fortune. Welding was much more rewarding though. I got REAL things done back then. Now I constantly make changes to the same pieces of software and various managers requests. Half the time undoing whatever it was I did last week.
  • Re:Any code? (Score:4, Interesting)

    by anethema ( 99553 ) on Sunday August 12, 2012 @11:47AM (#40964383) Homepage

    I'm in northern canada, and every welder I know makes over 100k a year. They work in mills, plants, or on the oil patch. I'm sure locale has a lot to do with it.

An authority is a person who can tell you more about something than you really care to know.

Working...