Skip to main content

Julia Programming Language Bridges the Machine-Learning Gap

Julia, a new open-source language for high-performance computing environments, strikes a balance between high-level and low-level languages for machine learning workloads.

Illustration showing stars and lines with a bright light in the middle


Previously unsolvable computational problems are now within reach thanks to the convergence of a number of powerful forces. Recent tech advances in self-driving cars, machine translation and image and speech recognition wouldn’t be possible without corresponding advances in hardware and software. Deep learning, a programming approach where the computer learns from experience and concepts rather than from rules, is driving a remarkable shift in how computer scientists and businesses tackle those tough problems that humans solve easily but computers were previously unable to solve.

The Race to Faster, Cheaper and Better

Deep learning systems are incredibly resource hungry. These systems perform massive computations on huge data sets. Distributed cloud computing, parallelized GPUs, large high-quality data sets, fast storage and high-bandwidth networking are the major assets that power deep learning. The plummeting costs of these resources combined with the development of open-source frameworks that simplify their orchestration is bringing challenging problems within reach. Resource provisioning and management was, until recently, a tedious undertaking requiring the skills of a trained IT department. Technology is rapidly advancing, which abstracts away the complexity of distributed and parallel computing. So, deep learning programmers no longer need to be experts in working in high-performance computing (HPC) environments.

It’s a race. Whichever company can be first to deploy the brightest and safest self-driving car will have a tremendous market advantage. When computers can diagnose medical conditions by reading patient images, the entire medical industry will change. Robots replacing humans in conversational roles will recast the face of many businesses. Companies that invest the resources to hire the brightest minds and set up modern HPC environments will emerge ahead in cracking these tough problems. Also key to tackling huge challenges is creating agile hardware and software environments where developers can quickly design, code, test and deploy iterations of software.

Traditional programming languages are either high-level or low-level. High-level languages strip down the details that would slow down developers. Low-level languages require the developer to manage the details. Program at a high level and you can produce code quickly. But that code may not run very quickly. If you need efficient, optimized code, you may be better off writing it in a low-level language. Until recently, developers’ options were “runs fast” or “is easy to code.” You didn’t get to pick both—that was, until something changed a few years ago.

Introducing Julia

Julia (julialang.org) is an open-source general programming language that’s well-suited to applied math and computer science problems. Viral Shah, one of the four co-creators of Julia, describes it as a high-performance dynamic programming language that’s not only fast but also easy to program. (Alan Edelman, Jeff Bezanson and Stefan Karpinski were the other co-creators.) Julia is the answer to the “pick fast or easy” dilemma. In fact, the seeds of Julia were planted in a 2009 email exchange that set out to prove those “fast or easy” people wrong. Shah likes to brag: “Easy as Python. Fast like C.” And, he has data to prove his performance case. Benchmarks on several common code patterns show Julia to be as fast or faster than C for a majority of the tests performed. And Julia beat or equaled FORTRAN performance in seven of the eight tests (bit.ly/2ITft3p). It’s Julia’s just-in-time compiler combined with the language’s design that make it competitive with C performance.

Regarding the “easy as Python” boast, the Julia website (julialang.org) gives a taste of the language. Julia’s syntax is as easy (or easier) than many other mathematical programming languages such as Python, R, SAS, Matlab, Octave and Scilab. And Shah points out that Julia blurs the boundaries between high- and low-level programming. This is particularly useful for those computing problems that require working with abstractions and with details.

Shah notes that he needed something like Julia when he was doing his Ph.D. work in scientific computing (his thesis was in high performance parallel programming), but his interest in the subject dates to his undergrad studies and beforehand.

Julia has been downloaded 1.8 million times since the launch of the julialang.org website in 2012. Half of those downloads were in 2017, and Shah says that downloads are doubling every nine months. Shah is also proud that over 1,800 packages are available in the Julia ecosystem, many of which have been contributed by computer scientists.

Julia is particularly well-suited for deep learning problems: it’s very efficient at preprocessing massive amounts of data, it’s easy to write readable and maintainable code in Julia and, because Julia solves the “pick fast or easy” problem, developing a prototype in one language and rewriting for production in another isn’t necessary. Specific to deep learning, the highly-regarded Flux machine learning framework comes built in. Users can also implement deep learning solutions via the popular Scikit-learn, TensorFlow and MXNet packages. To ensure fast computing with these packages, the JuliaDB package automatically scales calculations to multiple CPU or GPU cores on a single machine or cluster. And, to support flexible scalability, JuliaRun delivers a host of features that deploy, run and manage Julia applications on public and private clouds. JuliaDB and JuliaRun, Shah explains, “enable the use of complex scalable architectures with no understanding of the architecture.”

Julia’s Deep Focus

Shah’s company, Julia Computing (juliacomputing.com), which provides commercial support for the language, has partnered with IBM to put Julia to the test in a real-world experiment. Shah and Ranjan Anantharaman (also from Julia Computing) documented their case study in “Deep Learning in Julia to Detect Diabetic Retinopathy on IBM POWER8* + NVIDIA GPUs” (bit.ly/2LdlKFu). The project aimed to train a deep learning model to screen for diabetic retinopathy to facilitate early treatment before the condition leads to blindness. Data for the model consisted of a number of eye fundus images, plus preclassified training data.

The project team chose IBM POWER8 hardware for the 2016 experiment to squeeze the best possible performance from their software infrastructure. “We chose to run this experiment on the IBM Power Systems* platform, which features high performance, large caches, high memory and I/O bandwidth, tight integration with GPU accelerators, and parallel multithreaded IBM POWER* architecture that is well adapted to ensure that GPUs are used to their fullest potential,” Shah says.

MXNet is an Apache open-source project for training and deploying deep neural networks, which touts scalability, development speed, portability and memory, and computation efficiency. NXNet also automates common workflows, making the expression of standard neural networks quick and concise. The development team chose MXNet.jl, coded in Julia, for the deep learning work.

According to Shah, the POWER processor with NVIDIA GPU accelerators increased processing speed by 57x and provides 2x-3x more memory bandwidth. Those attributes, combined with tight GPU accelerator integration, creates a high-performance environment for deep learning with Julia.

In designing the POWER8 platform, IBM partnered with NVIDIA to develop NVLink, a fast communication path between on-board CPUs and GPUs. Computing performance is also increased by the use of NVIDIA Tesla P100 NVLink-enabled GPUs.

Pushing Boundaries

Given rapidly growing data set sizes and the increasing sophistication and complexity of artificial intelligence systems, hardware and its associated infrastructure needs to scale accordingly while remaining cost-efficient, according to an IDC survey (bit.ly/2G9NOa1).

And the OS is no longer an obstacle: Linux* on POWER allows, in most cases, for a seamless transition with a recompiler for compiled code. An IDC whitepaper makes the case that clients would be doing themselves a disservice by not comparing x86 price and performance metrics with those of the Power Systems platform (ibm.co/2T6cPwp).
 

The world is rapidly changing. Challenges are greater than ever, and so are clients’ choices for how to tackle them.

IBM Systems Webinar Icon

View upcoming and on-demand (IBM Z, IBM i, AIX, Power Systems) webinars.
Register now →