LWN: Comments on "Deep learning and free software" https://lwn.net/Articles/760142/ This is a special feed containing comments posted to the individual LWN article titled "Deep learning and free software". en-us Sat, 30 Aug 2025 13:38:49 +0000 Sat, 30 Aug 2025 13:38:49 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Let's not exaggerate https://lwn.net/Articles/761176/ https://lwn.net/Articles/761176/ wx <div class="FormattedComment"> <font class="QuotedText">&gt; 1. Non-synchronized GPU atomics</font><br> <p> This is spot on at least for anything using TensorFlow which, sadly, applies to the majority of deep learning research out there. The respective issue trackers on github are full of bug reports about TensorFlow not generating reproducible results. These are usually closed with claims that the use of atomics is strictly required to obtain plausible performance.<br> <p> Anecdotal evidence from colleagues involved in deep learning research suggests that even if you have access to all source code and training data the resulting networks will often differ wildly if TensorFlow is involved. E.g. it's not uncommon for success rates of a trained classifier to vary from 75% to 90% between different training runs. With that in mind the discussion within Debian is, well, a little off from actual real-world problems.<br> </div> Sat, 28 Jul 2018 19:44:33 +0000 Let's not exaggerate https://lwn.net/Articles/761175/ https://lwn.net/Articles/761175/ wx <div class="FormattedComment"> <font class="QuotedText">&gt; &gt; As in, you could run a plain register-to-register floating-point arithmetic instruction on the GPU and it would sometimes give different results for the same input (on the same GPU and same compiled code etc)?</font><br> <font class="QuotedText">&gt; Yup.</font><br> <p> Unless you come up with code to reproduce such situations I'll have to call this out as an urban legend. I've been doing numerical optimization research (which has to be 100% reproducible) on virtually every high-end Nvidia GPU (consumer and Tesla) released since 2011. I've seen a lot of issues with Nvidia's toolchain but not a single case of the actual hardware misbehaving like that. Correct machine code will generate the exact same results every time you run it on the same GPU when using the same kernel launch parameters.<br> <p> I'm also not aware of any credible reports by others to the contrary. There was one vague report of a Titan V not producing reproducible results (<a rel="nofollow" href="http://www.theregister.co.uk/2018/03/21/nvidia_titan_v_reproducibility/">http://www.theregister.co.uk/2018/03/21/nvidia_titan_v_re...</a>) but that is much more likely to be caused by the micro architecture changes in Volta. Intra-warp communication now requires explicit synchronization which can require significant porting effort for existing code bases and is rather tricky to get right.<br> </div> Sat, 28 Jul 2018 19:03:07 +0000 Let's not exaggerate https://lwn.net/Articles/761174/ https://lwn.net/Articles/761174/ wx <div class="FormattedComment"> <font class="QuotedText">&gt; 20 computers with latest GPUs will cost around $100000</font><br> <p> Depending on the type of network to be trained that figure is off by an order or magnitude or two. Many networks require a lot of memory per GPU and many GPUs within a single node. Often you will need Tesla branded hardware because consumer cards don't have enough memory. A single DGX-1 (8 GPUs) will set you back by about EUR 100k including "EDU/startup" rebates. A single DGX-2 (16 GPUs) currently runs for about EUR 370k.<br> <p> <font class="QuotedText">&gt; And now we have even more AI-specialized hardware accelerators, so the price can be cut even further.</font><br> <p> I guess you're referring to Google's TPUs which, however, are special purpose hardware and have virtually no effect on Nvidia pricing which is stable at extremely high levels. Even several years old used Tesla hardware will sell for little less than the original retail price.<br> </div> Sat, 28 Jul 2018 18:40:14 +0000 Deep learning and free software https://lwn.net/Articles/761158/ https://lwn.net/Articles/761158/ bridgman <div class="FormattedComment"> Forgot to mention that TensorFlow support on ROCm is now up to version 1.8. IIRC Lumin's concerns were specifically related to AlphaGo Zero, which I believe trains its networks using TensorFlow:<br> <p> <a rel="nofollow" href="https://gpuopen.com/rocm-tensorflow-1-8-release/">https://gpuopen.com/rocm-tensorflow-1-8-release/</a><br> </div> Sat, 28 Jul 2018 04:25:08 +0000 Deep learning and free software https://lwn.net/Articles/761156/ https://lwn.net/Articles/761156/ bridgman <div class="FormattedComment"> The hardware is non-free so you would need to add the amdgpu HW microcode images, but other than that the entire stack is open source. The core kernel code is upstream so should flow into the various Debian branches over time (Vega KFD is probably only in experimental at the moment).<br> </div> Sat, 28 Jul 2018 04:11:34 +0000 Let's not exaggerate https://lwn.net/Articles/760958/ https://lwn.net/Articles/760958/ gpu <div class="FormattedComment"> Two better examples of non-determinism on GPUs would be:<br> <p> 1. Non-synchronized GPU atomics (<a rel="nofollow" href="https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#atomic-functions">https://docs.nvidia.com/cuda/cuda-c-programming-guide/ind...</a>)<br> <p> 2. Non-deterministic numerical algorithms, e.g. <a rel="nofollow" href="http://papers.nips.cc/paper/4390-hogwild-a-lock-free-approach-to-parallelizing-stochastic-gradient-descent">http://papers.nips.cc/paper/4390-hogwild-a-lock-free-appr...</a> (though, this particular example is CPU-specific)<br> </div> Thu, 26 Jul 2018 14:26:17 +0000 Deep learning and free software https://lwn.net/Articles/760938/ https://lwn.net/Articles/760938/ t-v <div class="FormattedComment"> But is it blob-free enough to have in Debian?<br> <p> Given that there is (in progress) ROCm-support in the usual deep learning libraries, it would be a great step towards having a things like DeepSpeech (in one implementation or other) in Debian - something I think would be hugely beneficial to assistant devices etc.<br> <p> </div> Thu, 26 Jul 2018 13:26:35 +0000 Interesting link somewhat related https://lwn.net/Articles/760623/ https://lwn.net/Articles/760623/ pr1268 <p>Given the discussion (in this article) about computer learning and <a href="https://en.wikipedia.org/wiki/Go_(game)">Go</a>, it's interesting to run across this link: <a href="https://www.theatlantic.com/magazine/archive/2018/06/henry-kissinger-ai-could-mean-the-end-of-human-history/559124/">How the Enlightenment Ends</a>.</p> <blockquote><font class="QuotedText">I was amazed that a computer could master Go, which is more complex than chess.<br/> [...]<br/> The speaker insisted that this ability could not be preprogrammed. His machine, he said, learned to master Go by training itself through practice.</font></blockquote> <p>Also somewhat unusual is <a href="https://www.henryakissinger.com/">who the author is</a>...</p> Tue, 24 Jul 2018 02:17:17 +0000 Let's not exaggerate https://lwn.net/Articles/760585/ https://lwn.net/Articles/760585/ sfeam This all seems rather tangential to the original point. Hardware differences or nondeterminism are of interest <i>if you care about 100% reproducibility</i>. As Cyberax points out, that is not usually a concern in training a neural net. The question is, if the application itself does not require 100% reproducibility does this nevertheless affect how it can be licensed? From my point of view the reliability or reproducibility of a program's output is not a property on which "free vs non-free" hinges. If you have the code, you have the input, you have everything needed to build and run the program, and yet the output is nonreproducible, that is not due to a lack of freedom. To claim otherwise opens the door to arguments that a nondeterministic code can never be free, or for that matter that the presence of bugs makes a program non-free. <p> So in my view no, the presence of pre-calculated values or nondeterministic hardware or code that depends on non-reproducible properties like clock time, none of that affects the free/non-free status of the code itself for the purpose of licensing. Mon, 23 Jul 2018 16:43:06 +0000 Let's not exaggerate https://lwn.net/Articles/760523/ https://lwn.net/Articles/760523/ excors <div class="FormattedComment"> Differences between GPU models and driver versions seem like a separate issue, not related to the claim that "Hardware itself is also not that trustworthy". It's still important for reproducibility, but not really any different to software on CPUs where different compilers and different libc maths functions will give different results.<br> <p> RAM corruption would count as hardware nondeterminism, but it looks like Tesla GPUs do have ECC - e.g. <a href="https://www.nvidia.com/content/tesla/pdf/NVIDIA-Tesla-Kepler-Family-Datasheet.pdf">https://www.nvidia.com/content/tesla/pdf/NVIDIA-Tesla-Kep...</a> says "External DRAM is ECC protected in Tesla K10. Both external and internal memories are ECC protected in Tesla K40, K20X, and K20" (where "internal memories" means caches, register files, etc), so they've been doing it since 2012.<br> </div> Mon, 23 Jul 2018 09:55:54 +0000 Let's not exaggerate https://lwn.net/Articles/760522/ https://lwn.net/Articles/760522/ epa <div class="FormattedComment"> I guess it's the second part of your original comment that appears not to fit. "Especially since neural networks often use f16 or even f8 precision." The reasons you describe for nondeterminism don't seem that they would affect smaller floating point types any worse than bigger ones.<br> </div> Mon, 23 Jul 2018 09:53:41 +0000 Let's not exaggerate https://lwn.net/Articles/760520/ https://lwn.net/Articles/760520/ Cyberax <div class="FormattedComment"> <font class="QuotedText">&gt; As in, you could run a plain register-to-register floating-point arithmetic instruction on the GPU and it would sometimes give different results for the same input (on the same GPU and same compiled code etc)?</font><br> Yup.<br> <p> <font class="QuotedText">&gt; That would seem very surprising - do you have some evidence for that?</font><br> I don't have examples of when 2+2 = 5, but I haven't searched for them. Usually it boils down to:<br> <p> 1) Trigonometric and transcendental functions are implemented _slightly_ differently between different GPU models or driver versions.<br> 2) Optimizers try to use fused instructions just a little bit differently when compiling shaders on different driver versions.<br> 3) RAM on GPUs is most definitely not using ECCs and it's clocked at pretty high frequencies. So you can expect not-really-occasional data corruptions. <br> </div> Mon, 23 Jul 2018 09:30:33 +0000 Let's not exaggerate https://lwn.net/Articles/760519/ https://lwn.net/Articles/760519/ excors <div class="FormattedComment"> As in, you could run a plain register-to-register floating-point arithmetic instruction on the GPU and it would sometimes give different results for the same input (on the same GPU and same compiled code etc)? That would seem very surprising - do you have some evidence for that?<br> <p> The only references I can find to nondeterminism are about e.g. reductions using atomic add, where the nondeterministic part is just the order in which the parallel threads execute the add instruction, which matters since floating point addition is not associative. But if you imposed some order on the threads then it would go back to being perfectly deterministic.<br> </div> Mon, 23 Jul 2018 09:24:47 +0000 Let's not exaggerate https://lwn.net/Articles/760518/ https://lwn.net/Articles/760518/ Cyberax <div class="FormattedComment"> Orchestrating software is usually not a problem here, there are tons of free software available.<br> <p> The problem is in CUDA or OpenCL implementations - the free stacks basically suck, so everybody uses proprietary drivers.<br> </div> Mon, 23 Jul 2018 09:06:43 +0000 Let's not exaggerate https://lwn.net/Articles/760517/ https://lwn.net/Articles/760517/ Lennie <div class="FormattedComment"> In the article it was mentioned that those clusters don't run free software. And it would take a lot more time without it.<br> </div> Mon, 23 Jul 2018 08:28:20 +0000 Let's not exaggerate https://lwn.net/Articles/760515/ https://lwn.net/Articles/760515/ Cyberax <div class="FormattedComment"> Yes. Hardware is far less trustworthy. I guess you can do multiple runs and compare the results... Neural networks are self-correcting during training, so I’m not really aware of anybody working on it.<br> </div> Mon, 23 Jul 2018 07:35:37 +0000 Let's not exaggerate https://lwn.net/Articles/760509/ https://lwn.net/Articles/760509/ epa <div class="FormattedComment"> The floating point operations provided by an FPU will give approximate results in many cases, but they are deterministic. Is it different for GPU calculations?<br> </div> Mon, 23 Jul 2018 06:46:40 +0000 Deep learning and free software https://lwn.net/Articles/760483/ https://lwn.net/Articles/760483/ k8to <div class="FormattedComment"> leela-zero is effectively a client in a distributed effort to build neural network weights for leela-zero to use to play Go well. Effectively, there's no training data, since this is in the class of problems where the code can self-train without external data by playing itself. <br> <p> So this is basically a distributed computing client as well as a Go engine that runs with the results of that distributed computing effort.<br> <p> From a free software perspective, the major concerns I see for leela-zero are the ownership and reproducibility of the "central infrastructure" so that others could continue or proceed alternatively in this process without the help of the original creators.<br> <p> That all of that work is going on in the public view on github with the tools exposed should go a long way towards alleviating practical concerns, but it would be nice if the server tools were packaged as well.<br> <p> </div> Sat, 21 Jul 2018 20:53:56 +0000 Let's not exaggerate https://lwn.net/Articles/760481/ https://lwn.net/Articles/760481/ Cyberax <div class="FormattedComment"> There are several sources of non-determinism here, mostly from parallel execution. Hardware itself is also not that trustworthy, especially since neural networks often use f16 or even f8 precision.<br> </div> Sat, 21 Jul 2018 20:24:07 +0000 Let's not exaggerate https://lwn.net/Articles/760480/ https://lwn.net/Articles/760480/ epa <div class="FormattedComment"> Yes, during the training stage the time limit would have to be expressed as a number of computation steps rather than wall clock time. That seems like common sense anyway. <br> </div> Sat, 21 Jul 2018 17:22:03 +0000 Let's not exaggerate https://lwn.net/Articles/760479/ https://lwn.net/Articles/760479/ sfeam If we are considering game-playing programs that must respond to time-pressure limits, then full reproducibility might require either identical hardware or a dummied-up clock so that the nominal clock time of all decision points is pre-determined. Sat, 21 Jul 2018 16:53:49 +0000 Let's not exaggerate https://lwn.net/Articles/760478/ https://lwn.net/Articles/760478/ epa <div class="FormattedComment"> Not deterministic? Surely you can seed the pseudo-random number generator with an agreed value and get reproducible results? Or is there something in the GPU hardware used that makes the output inherently non-deterministic?<br> </div> Sat, 21 Jul 2018 16:47:33 +0000 Let's not exaggerate https://lwn.net/Articles/760402/ https://lwn.net/Articles/760402/ Cyberax <div class="FormattedComment"> You do need powerful GPUs to train models, the gulf in performance between GPUs and CPUs is simply too ridiculous to even consider. There's also a problem with trust - deep learning is not deterministic and you can't easily cross-check the results.<br> </div> Fri, 20 Jul 2018 01:49:36 +0000 Let's not exaggerate https://lwn.net/Articles/760400/ https://lwn.net/Articles/760400/ tedd <div class="FormattedComment"> Would it also be feasible to develop a BOINC project for this, to get the community to train the models in a distributed fashion?<br> </div> Thu, 19 Jul 2018 23:56:03 +0000 Deep learning and free software https://lwn.net/Articles/760343/ https://lwn.net/Articles/760343/ xav <div class="FormattedComment"> Isn't a game with "liberated" artwork &amp; code free, even if I can't redraw the artwork myself ?<br> </div> Thu, 19 Jul 2018 15:12:57 +0000 Too much CUDA (was: Deep learning and free software) https://lwn.net/Articles/760286/ https://lwn.net/Articles/760286/ ssl <div class="FormattedComment"> Well, the cause of this simple: CUDA is much easier to program against than OpenCL, simple as that.<br> </div> Thu, 19 Jul 2018 11:47:01 +0000 Too much CUDA (was: Deep learning and free software) https://lwn.net/Articles/760278/ https://lwn.net/Articles/760278/ Sesse <div class="FormattedComment"> Possibly because OpenCL doesn't really work too well.<br> </div> Thu, 19 Jul 2018 09:07:23 +0000 Deep learning and free software https://lwn.net/Articles/760276/ https://lwn.net/Articles/760276/ brooksmoses <div class="FormattedComment"> Oh, good. Thanks for updating me! The conference I was thinking of was probably eight or ten years ago.<br> </div> Thu, 19 Jul 2018 07:58:51 +0000 Deep learning and free software https://lwn.net/Articles/760274/ https://lwn.net/Articles/760274/ Sesse <div class="FormattedComment"> I agree you _also_ need to ship the weights. And if the final weights are e.g. quantized (ie., inference uses a form different from training), you'd need to ship the original ones, too, for continued training.<br> <p> In the case of Leela, it's all a bit muddied in that it's not even clear exactly what the training data is. The amount of human input is zero, but there's all these games produced as part of the training that's being used to train the network itself. I'm not sure if they need to be included or not—I'd lean towards not.<br> </div> Thu, 19 Jul 2018 07:39:42 +0000 Deep learning and free software https://lwn.net/Articles/760275/ https://lwn.net/Articles/760275/ ernstp <div class="FormattedComment"> AMD's stuff is moving in the right direction:<br> <p> <a href="https://github.com/ROCmSoftwarePlatform/MIOpen">https://github.com/ROCmSoftwarePlatform/MIOpen</a><br> </div> Thu, 19 Jul 2018 07:38:31 +0000 Let's not exaggerate https://lwn.net/Articles/760273/ https://lwn.net/Articles/760273/ Cyberax <div class="FormattedComment"> <a href="https://voice.mozilla.org/">https://voice.mozilla.org/</a><br> </div> Thu, 19 Jul 2018 07:30:05 +0000 Deep learning and free software https://lwn.net/Articles/760272/ https://lwn.net/Articles/760272/ pabs <div class="FormattedComment"> Debian also discussed this back in 2012 at DebConf:<br> <p> <a href="http://penta.debconf.org/dc12_schedule/events/888.en.html">http://penta.debconf.org/dc12_schedule/events/888.en.html</a><br> <p> Some other examples of deep learning issues:<br> <p> <a href="https://bugs.debian.org/699609">https://bugs.debian.org/699609</a><br> <a href="https://ffmpeg.org/pipermail/ffmpeg-devel/2018-July/231828.html">https://ffmpeg.org/pipermail/ffmpeg-devel/2018-July/23182...</a><br> <p> </div> Thu, 19 Jul 2018 07:04:21 +0000 Let's not exaggerate https://lwn.net/Articles/760270/ https://lwn.net/Articles/760270/ pabs <div class="FormattedComment"> DeepSpeech isn't the greatest example, I read somewhere that some of the source data used for training the model is proprietary.<br> </div> Thu, 19 Jul 2018 06:58:46 +0000 Too much CUDA (was: Deep learning and free software) https://lwn.net/Articles/760260/ https://lwn.net/Articles/760260/ rbrito <div class="FormattedComment"> I know that this is orthogonal to the issue in question, but I just can't help to express my disappointment when I see a lot of "data analysis/big data/machine learning" frameworks supporting only CUDA (and frequently requiring/recommending Linux), yet the more open alternatives (like OpenCL) are totally forgotten...<br> </div> Thu, 19 Jul 2018 06:22:34 +0000 Let's not exaggerate https://lwn.net/Articles/760262/ https://lwn.net/Articles/760262/ Cyberax <div class="FormattedComment"> Let's not exaggerate, please.<br> <p> Training a neural net requires a lot of compute time, but it's definitely not "outside of abilities of a non-profit". A small cluster of 10-20 computers outfitted with GPUs will be able to train models like AlphaZero within a day or so. That's what Mozilla does for their DeepSpeech project.<br> <p> 20 computers with latest GPUs will cost around $100000 - not an insignificant amount, but not insurmountable either. And now we have even more AI-specialized hardware accelerators, so the price can be cut even further.<br> <p> <p> </div> Thu, 19 Jul 2018 05:05:48 +0000 Deep learning and free software https://lwn.net/Articles/760259/ https://lwn.net/Articles/760259/ pabs <div class="FormattedComment"> Stallman has revised his position on hardware, it is a bit more nuanced now:<br> <p> <a href="https://www.fsf.org/blogs/rms/how-to-make-hardware-designs-free">https://www.fsf.org/blogs/rms/how-to-make-hardware-design...</a><br> <a href="http://www.wired.com/2015/03/need-free-digital-hardware-designs/">http://www.wired.com/2015/03/need-free-digital-hardware-d...</a><br> <a href="https://www.wired.com/2015/03/richard-stallman-how-to-make-hardware-designs-free/">https://www.wired.com/2015/03/richard-stallman-how-to-mak...</a><br> </div> Thu, 19 Jul 2018 03:14:03 +0000 Deep learning and free software https://lwn.net/Articles/760258/ https://lwn.net/Articles/760258/ brooksmoses <div class="FormattedComment"> There's an interesting analogy here, in that this is not the first time that the free-software community has grappled with the idea that having the source code is not sufficient to edit the operation of a computing system without a lot of resources. A similar problem arises with computer hardware: Even if I had all of the source code to the processor in my television (never mind the one in my workstation!), I couldn't rebuild that processor with a bugfix without a few billion dollars in resources.<br> <p> I've been at a conference where Richard Stallman addressed that issue -- which is to say, he basically punted and said that Free Software was irrelevant to computer hardware because nobody would be able to fab a replacement chip. Personally, I think that's a shortsighted conclusion (and it was particularly ironic that he said this at a conference of people largely funded by DoD contracts, many of whom likely would be in a position to fab their own chips), but I do find it an interesting datapoint. Is the sort of neural-net training data that can only be generated by running something on the equivalent of Google's CloudTPU clusters for zillions of hours a thing that is limited in its ability to be "free" in much the same way that the Xeon in my desktop is limited by the technological inability of anyone but Intel to make one? And, if so, is the right answer actually to say "that's not a problem we can solve with Software Freedom right now," as Stallman did with hardware?<br> <p> If so, then the question becomes: What is practical can we do instead? And, of those options, what do we want to do?<br> </div> Thu, 19 Jul 2018 01:29:04 +0000 Deep learning and free software https://lwn.net/Articles/760257/ https://lwn.net/Articles/760257/ brooksmoses <div class="FormattedComment"> I'd disagree with that premise -- neural weights are similar to object code, but I think the differences matter.<br> <p> One difference is that it's not always true that you'd modify things by changing the training program or the input data. In many cases where the input set changes over time, it's common to continually train the model by taking last-week's converged weights as a starting point and iterating on new inputs, and thereby tweaking the weights to make this week's model. It may not be "direct editing", but it is certainly a situation where the preferred form of input for making changes includes the existing weights.<br> <p> Another difference is that I think the non-determinism of the training process is somewhat more of a quibble than you do. Certainly it's a reason why it's important to include the trained weights with the source code to make something "free"; if you can't fix a bug in the file-input part of a program without changing the computations it makes to analyze the file after it's opened, that's not really in the spirit of software freedom. A similar case would be if I have a magic proprietary compiler that analyzes my C++ floating-point math and promotes floats to double where needed for numerical stability, and I don't make that free, me giving you my physics-model source code isn't giving you what you need to rebuild it and get the same results.<br> <p> The fundamental problem, I think, is simply that we don't have the computer science yet to be able to edit the weights directly, and so there _is_ really no ideal starting point for making "small" changes to an existing model (other than retraining from the existing weights). We're basically at a point where important parts of the program are write-only and to edit them we have to recreate them -- and that re-creation can involve human creative input as well as machine time.<br> </div> Thu, 19 Jul 2018 01:12:21 +0000 Deep learning and free software https://lwn.net/Articles/760256/ https://lwn.net/Articles/760256/ ejr <div class="FormattedComment"> Modern day's "Table Maker's Dilemma"?<br> </div> Thu, 19 Jul 2018 00:49:13 +0000 Deep learning and free software https://lwn.net/Articles/760252/ https://lwn.net/Articles/760252/ sfeam It is not really novel for practical use of a program to depend on access to pre-calculated data values. Is the Gnu Scientific Library unfree because it embeds tables of numerical coefficients that would be tedious (but surely possible) to recreate if they were not included with the source? Thu, 19 Jul 2018 00:05:29 +0000