News for hackers. Stuff that matters.
Re:Drop-in GPU Acceleration of GNU Octave by jordigh on Thursday September 11, 2014 @05:29PM (#8305258)
Sigh, I wish people would address the problem here that nvidia's CUDA runtime is non-free. There is no OpenCL free implementation that I know of either, except Clover, but it currently merely translates the OpenCL to run on the CPU instead of the GPU. I think I've heard of some free CUDA implementations that were in similar embryonic stages.

Octave is a GNU package. GNU's purpose is to ensure that you can use free software. Running to tie Octave to flashy features like GPU acceleration without first pausing to fix the initial problem of non-free GPU acceleration is putting the horse before the cart. This works against Octave's goal, to provide a free alternative to Matlab, one that lets you understand and control your computations down to the hardware level. If we don't emphasise software freedom, then there is no need for Octave, since we already have Matlab. Indeed, it is this very freedom that nvidia is abusing here to accelerate Octave's BLAS libraries, a task that would be much more difficult with Matlab, where they don't have the source code.

I know that nobody wants to even think that this problem exists and even fewer people want to fix Clover because it's such a difficult task, but it's a task that we can't ignore.

Note also that because the GPU libraries are not a system library as defined by the GPL (they are not shipped with the OS), you can't even distribute GPU-accelerated Octave object code. We consider the Octave C++ API to fall well under the domain of the GPL's copyleft.

Personally, as a GNU Octave developer, I am very unhappy that nvidia is using Octave to advertise its hardware and non-free drivers. I am also unhappy that nvidia is luring users to use non-free software, acting against our goals. I reiterate Linus Torvalds's well-known sentiments against nvidia.

Re:Drop-in GPU Acceleration of GNU Octave by jacquesm on Thursday September 11, 2014 @07:23PM (#8305784)
While I appreciated your principled stance I believe it is more of a graded issue and one with several practical steps in between that are all 'freer' than the previous step.

- matlab + windows + CUDA

- octave + linux + CUDA

- octave + linux + Free OpenCL

So you're halfway there and it could be better but it could also be worse.

Writing a very high performance piece of software against a bunch of trade-secret grade hardware for which the manufacturer already provides a bunch of support for many people is not worth the trouble. As long as Nvidia supports their hardware using CUDA and OpenCL is not going to be brought up to that level this will likely continue.

A positive view would seem to me that this midway position will allow more people to move to Octave which in the longer run might free up some funds somewhere to tackle the problem you mention.

Re:Drop-in GPU Acceleration of GNU Octave by sjtrny on Friday September 12, 2014 @12:58AM (#8306651)
Don't forget MATLAB runs on Linux too!
Re:Drop-in GPU Acceleration of GNU Octave by lightcatcher on Friday September 12, 2014 @03:14AM (#8306904)
Forget non-free CUDA runtime, there are larger problems with the CUDA toolchain with respect to free software. The actual instructions executed by Nvidia's chips are pretty much undocumented. Nvidia provides great documentation for PTX, which is essentially assembly for a virtual GPU. All tools to convert PTX to SASS (the actual instructions ran on GPU) are proprietary and undocumented. Nvidia does this because it gives them much more freedom to modify the SASS language as well as the chips themselves. The existence of standards-free SASS code (and no open source compiler that can target SASS) makes truly open source GPU computing on Nvidia hardware impossible.
Re:Drop-in GPU Acceleration of GNU Octave by seiji on Thursday September 11, 2014 @06:02PM (#8305433)
All nvidia did was make an API compatible BLAS library with automatic GPU offloading. Other programs using BLAS functions then get automatically GPU accelerated. Nobody altered octave. They just LD_PRELOAD it in place. The same thing works with R too.

The goal is "have software that works," not "have software that retains ideological purity at the cost of advancement."

Re:Drop-in GPU Acceleration of GNU Octave by aw3c2 on Thursday September 11, 2014 @06:18PM (#8305517)
That's your goal. In my opinion our goal as society should absolutely be software that everyone can "run, copy, distribute, study, change and improve".
Re:Drop-in GPU Acceleration of GNU Octave by melling on Thursday September 11, 2014 @06:44PM (#8305628)
That's great. However, we'll all be dead and the job still won't be finished. I'm all for free software but the "Stallman method" is going to take a couple of lifetimes. Being a little practical will address the real problem of expensive software. I've been an Emacs user for 20 years but these days I find myself using Sublime and IntelliJ much more often. I think we're all better off if we also support good commercial and create a competitive environment
Re:Drop-in GPU Acceleration of GNU Octave by RichardFord on Thursday September 11, 2014 @10:19PM (#8306313)
There is no "our goal as society". But the vast majority of people that care about running Matlab, Octave don't share your goal.
Re:Drop-in GPU Acceleration of GNU Octave by wtallis on Thursday September 11, 2014 @11:36PM (#8306482)
FYI, Beignet (https://01.org/zh/beignet) is an open-source implementation for Intel GPUs that includes all the required features of OpenCL 1.1.
Re:Drop-in GPU Acceleration of GNU Octave by jordigh on Friday September 12, 2014 @10:20AM (#8308135)
Thanks, I did not know about Beignet. This is a step in the right direction.
Re:Drop-in GPU Acceleration of GNU Octave by CGudapati on Friday September 12, 2014 @01:00AM (#8306653)
Completely unrelated and Sorry for derailing but isn't it cart before the horse? I mean the horse is always in front of the cart. I am not a native English speaker. Am i missing anything?
Re:Drop-in GPU Acceleration of GNU Octave by graphene on Friday September 12, 2014 @03:05AM (#8306889)
You are correct.
Re:Drop-in GPU Acceleration of GNU Octave by dredmorbius on Friday September 12, 2014 @07:45AM (#8307531)
FYI, you're correct.
Re:Drop-in GPU Acceleration of GNU Octave by foxhill on Thursday September 11, 2014 @06:35PM (#8305585)
there is also pocl (http://portablecl.org/), which aims to one day target GPUs (although currently it does not).

the issue with free OpenCL implementations on the GPU is that the runtime will be closely coupled with the device driver, so short of open source drivers, there most likely wont be an OpenCL runtime that uses proprietary drivers.

that said, i believe both open source nvidia and radeon drivers support some level of OpenCL, although it's been a while since i've checked them..

nvidia will do what nvidia will do, they obviously have quite a lot of upstream swimming to do before they realise that CUDA is not the best approach to take.

Re:Drop-in GPU Acceleration of GNU Octave by SixSigma on Friday September 12, 2014 @04:14AM (#8307042)
Releases software with plugin architecture.

Get's mad when people use it.