Accelerate Machine-Learning Workloads with Intel® Math Kernel Library (Intel® MKL)

Accelerate Machine-Learning Workloads with Intel® Math Kernel Library (Intel® MKL)

Performance Brief Machine Learning Accelerate Machine-Learning Workloads with Intel® Math Kernel Library Speed up algorithm performance and insights by up to 7.9x Executive Summary Machine learning—a subset of artifcial intelligence (AI)—is quickly entering the mainstream. According to Gartner, machine-learning strategy development and investment is already in the top fve CIO priorities.1 And by 2021, 30 percent of net new revenue growth from industry-specifc solutions will include AI.2 Enterprises are already seeing business value generated from their machine-learning deployments. And the use cases for machine learning are expansive, ranging from detecting fraud, making product recommendations, and automating various business processes and tasks to enabling the next generation of applications such as autonomous cars. Machine learning allows researchers, data scientists, Table of Contents engineers, and analysts to produce reliable, repeatable decisions and results. It can reveal hidden insights through learning from historical relationships and trends Executive Summary . 1 in the data. As shown in Figure 1, machine learning running on Intel® architecture 3 Introduction ......................... 2 speeds up model training time by up to 7.9x. Gain Value from Machine Learning Accelerating model training time means faster predictive analytics, which can with Intel® Math Kernel Library . 2 provide a competitive edge in today’s fast-paced business environment. The Intel® Math Kernel Library (Intel® MKL), Intel® Advanced Vector Extensions 512 (Intel® Overview of Apache Spark* and Basic AVX-512), and Intel® Xeon® Scalable processors all contribute to machine-learning Linear Algebra Subprograms (BLAS) . 2 workload acceleration, without having to make any changes to Apache Spark* code Challenges of Apache Spark MLlib or acquiring specialized hardware. BLAS and Linear Algebra Package (LAPACK) Implementations . 3 Machine-Learning Workloads Run Better on Intel® Architecture Test Methodology . 3 Results .............................. 4 7.9X faSTer3 2.0X faSTer3 1.8X faSTer3 7.9x Increase in Machine-Learning Performance with Intel MKL . 5 USer recommenDaTion DocUmenT cLaSSificaTion PerSonaLiZeD ecommerce Appendix A: Alternating Latent Dirichlet Singular Value Libraries for Comparison . 6 Least Squares Allocation Decomposition (ALS) algorithm (LDA) algorithm (SVD) algorithm Appendix B: Test Confguration Information . 7 Intel® Math Kernel Library (Intel® MKL) Test Steps .............................7 Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Appendix C: Optimizations and Tunings . 10 BIOS Tuning ......................... 10 Intel® Xeon® Scalable Processors OS Tuning ............................ 10 Apache Hadoop Tuning .............. 10 Figure 1. Machine-learning algorithms optimized by Intel® Math Kernel Library and Apache Spark Tuning ................ 11 Intel® Advanced Vector Extensions 512 run faster on Intel® Xeon® Scalable processors. Performance Brief | Accelerate Machine-Learning Workloads with Intel® Math Kernel Library 2 Introduction Gain Value from Machine Learning with Recent advances in machine learning, a branch of artifcial Intel® Math Kernel Library intelligence (AI), are driving a surge in global productivity and The Apache Spark* MLlib framework is widely used in machine economic growth. Consider these facts: learning to solve high-value business use cases using its in- • Machine-learning patents grew at a 34 percent compound memory compute architecture and native linear algebra library annual growth rate (CAGR) between 2013 and 2017, the integration. Further optimization to the computing process can third-fastest growing category of all patents granted.4 be achieved using the Intel® Math Kernel Library (Intel® MKL). • IDC forecasts that spending on AI and machine learning will Intel MKL is a widely used library by enterprises of all types grow from USD 12 billion in 2017 to USD 57.6 billion by 2021.5 and sizes. It is designed to accelerate math processing routines, increase algorithm performance, and reduce development • Deloitte Global predicts the number of machine-learning time. The library includes many features, including linear pilots and implementations will double in 2018 compared algebra, vector statistics, data ftting, and neural networks. The to 2017, and double again by 2020.6 performance boost provided with Intel MKL is a major beneft Enterprises are already deriving business value from their because it does not require a modifed version of Spark, or machine-learning projects, which span a wide variety of use modifcations to Spark application code; it also does not cases such as fraud detection, product recommendations, require procurement of extra or special hardware. Only a few business process automation and autonomous cars. The steps are needed to install Intel MKL on the cluster. growing use of machine learning is tightly correlated with This paper compares the performance of Java*-based the proliferation of unstructured data and the need for f2jBLAS (the default MLlib linear algebra library) and Intel enterprises to remain competitive by improving time to MKL for machine-learning algorithms provided in the Apache market, driving innovation, and generating real-time insights Spark MLlib framework. in a digital economy. Enterprises of all types and sizes across industries collect vast Overview of Apache Spark* and Basic Linear amounts of data (typically in the petabytes range), analyze Algebra Subprograms (BLAS) it, and make decisions based on the outcome of the analysis. Apache Spark is a unifed analytics engine for big data Machine learning is a method used to devise complex processing, with built-in modules for SQL, streaming, models and algorithms that lend themselves to prediction; machine learning, and graph processing. Apache Spark MLlib in commercial use this is known as predictive analytics. It is a distributed machine-learning framework and is a leading is worth noting that the two go hand-in-hand as predictive solution for machine learning on large distributed datasets. models typically include a machine-learning algorithm. Many common machine-learning and statistical algorithms, For example, product recommendation, a feature on most including classifcation, regression, clustering, collaborative eCommerce websites, creates models using the Singular Value fltering, dimensionality reduction, as well as underlying Decomposition (SVD) algorithm, which learns from historical optimization primitives have been implemented and are relationships and trends in the data to suggest products likely shipped with MLlib, which simplifes large-scale machine- to be interesting to a particular consumer. Because machine- learning pipelines. Many machine-learning algorithms use learning models and algorithms are compute-intensive, it is linear algebra. Basic Linear Algebra Subprograms (BLAS) are important to fnd ways to speed up the computing process to routines that provide standard building blocks for performing power faster business and scientifc decision making. basic vector and matrix operations.7 Apache Spark* Solution Stack Spark Spark Spark Spark SQL Streaming MLlib GraphX Figure 2. Apache Spark* is a unifed analytics engine for big data processing. Performance Brief | Accelerate Machine-Learning Workloads with Intel® Math Kernel Library 3 Challenges of Apache Spark MLlib BLAS Test Methodology and Linear Algebra Package (LAPACK) Our tests show that Intel MKL signifcantly speeds up machine- Implementations learning algorithms when used with Spark MLlib on Intel Figure 3 shows the software hierarchy of Spark MLlib and architecture, compared to f2jBLAS. We focused on how MLlib its integration point with diferent BLAS and Linear Algebra can take advantage of the Intel® Advanced Vector Extensions Package (LAPACK) implementations. Spark MLlib evokes BLAS 512 (Intel® AVX-512) on Intel Xeon Scalable processor to and LAPACK calls provided by the high-level API which netlib- accelerate BLAS computations. The elapsed time of algorithms java* BLAS provides. Individual BLAS and LAPACK libraries can computed using f2jBLAS serve as the baseline metric. integrate with MLlib by implementing the function calls that The tests used the spark-perf machine-learning benchmark netlib-java BLAS exposes to low-level libraries. (see Appendix B for detailed test steps).8 We selected six f2jBLAS is the default library for Spark MLlib and is popular machine-learning algorithms for our MLlib tests: implemented in Java; thus, it does not require the Java Native • Alternating Least Squares (ALS) Interface (JNI) to be called from a Java Virtual Machine (JVM) • Principal Component Analysis (PCA) process. Native implementations of BLAS and LAPACK, such • Latent Dirichlet Allocation (LDA) as Automatically Tuned Linear Algebra Software (ATLAS), • Singular Value Decomposition (SVD) OpenBLAS, and ARnoldi PACKage (ARPACK), are naturally • Logistic regression written in low-level languages such as FORTRAN* and C to achieve top performance and called by the JNI within a JVM. • Linear regression However, these libraries are targeted for general CPU use, so Appendix B contains information on hardware, software, their implementations are not fully optimized to use all the workload, and CDH service confguration for our tests. CPU instructions provided by a given architecture. Appendix C includes optimization and tuning information. Intel MKL is a BLAS and LAPACK implementation optimized for Intel® Xeon® processors. It ofers signifcant

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us