博文

Programming KNL--Architecture

图片
Knights Landing Intel Xeon Phi processors are based on so-called many integrated cores (MIC) architecture, aiming to provide high-performance computational abilities and portable programming interfaces, of which I consider tthe second feature the most attractive characteristic for programmers. The first generation (KNC) was announced at 2012, but actually there is a prototype--Knights Ferry proposed before. In this article, we would like to discuss both architectural and programming features about the most recent Xeon Phi Processor--Knights Landing. Eye-catching Things Standalone Processor KNL could be used as a standalone processor or a coprocessor, and it could run several common operating systems, like REHL, CentOS, Fedora, and SUSE. While KNC does not support the function. 16GB HBM The on package memory is similar to that of GPU, but somehow larger. Further, because intel supports different kinds of memory usage, which we would discuss in later section, it is a

Install New GCC Versions in User Space

Before Install Perhaps the most common error might be imcompatible versions of gmp , mpfr , and mpc on linux machines. First notice that mpfr and mpc depend on gmp. Therefore, we download a gmp package from internet, which could any version that satisfies the critieria. I perfer one most close to the minimum requirement. ./configure --prefix=... --enable-shared make make install Next, we install mpfr, as mpc depends on both mpfr and gmp. Please remember add - -with-gmp= in the configuration phase. ./configure --prefix=... --enable-shared --with-gmp=... make make install Finally, install mpc before installing gcc, setting --with-gmp and --with-mpfr to the above directories. ./configure --prefix=... --enable-shared --with-gmp=... --with-mpfr=... make make install Install GCC Nice work as you have installed above trivial prerequisites. At outset, we unset these environment variables to make sure the purity  unset LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLU

Following the Guide--An Odd Problem with Linking MKL

Some days ago, I asked a problem on Stackoverflow, which is about mkl linking. Surprisingly, I found no one else has encountered a similar problem. Thus, I post the scenarios in the blog. Here's the link . How Do I Discover the Problem? In blitz, my deep learning framework, I have to mix openmp, blas, and cuda together. However, since my icc is the newest such that current nvcc 7.5 does not support it, I use g++, mkl and nvcc instead. I used the single dynamic library   that could simplify many options by the following command: -fopenmp -lmkl_rt But the thing is, my simple MNIST model could not generate a correct result! After a long period of debugging, I found multi-thread sgemm worked not in an expected way. Well, it really shocked me because I never wonder a famous vender product is wrong. Following the Guide By reading many documents, I found that by single dynamic library, mkl does not use GNU-thread internally: https://software.intel.com/en-us/forums