OpenCL benchmarks on Windows 10 (build 1803) vs Ubuntu Linux 18.04LTS.

Discussion in 'Linux Compatibility and Software' started by Dennismungai, Jun 8, 2018.

  1. Dennismungai

    Dennismungai Notebook Consultant

    Reputations:
    102
    Messages:
    230
    Likes Received:
    166
    Trophy Points:
    56
    Hello guys,

    As I was setting up Ubuntu 18.04LTS on the Clevo P950ER (the Eurocom Q6 variant), I decided to run a few OpenCL tests with both Pyrit and Luxmark to confirm just how well Intel's new Neo OpenCL platform runs on Linux, and if its' up to feature parity with the Windows driver.

    The Neo driver is what succeeds the previous Beignet project, that Intel now considers deprecated for newer GPU generations (Broadwell+).

    In the long run, Neo is intended to replace the closed source blobs distributed for OpenCL ICDs within the closed source Media SDK as the stack is opened up in the future. With this in mind, its' not recommended to link your OpenCL applications with the runtime library (igdrcl), but rather with the tried and true vendor neutral dispatcher ocl-icd .

    Documentation:

    1. Building the Neo OpenCL stack on Ubuntu 18.04LTS: https://gist.github.com/Brainiarc7/1d13c7f432ba03a8e38720c83cd973d5

    2. Getting Ubuntu 18.04LTS running on this machine: https://gist.github.com/Brainiarc7/f7da590bee1ed35ac5ed258ff9335fd6#file-linux-on-eurocom-q6-md

    3. Building pyrit from source and enabling both CUDA and OpenCL backends: https://gist.github.com/Brainiarc7/dc80b023af5b4e0d02b33923de7ba1ed

    Benchmark notes:

    The driver versions applied for both Windows + Linux were the latest builds as of the time of writing, namely R396 for NVIDIA. All OS updates had been conducted prior to the benchmarks.

    Results:

    Let's compare how a benchmark such as luxmark, available on both Windows and Linux, runs on the same system.

    Using both accelerators, on Ubuntu 18.04LTS:

    [​IMG]

    And the same device selection, but on Windows 10:

    [​IMG]

    Windows build 1803 is only marginally better in the score (a ~2.5% lead) using the simple benchmark scene (luxball). Later on, we will see the impact of increasing the scene's complexity on performance.

    Now, for individual results:

    On Linux, with the integrated GPU only using the Neo platform:

    [​IMG]

    And on Windows 10 build 1803, the same scene benchmark with the iGPU selected returns:

    [​IMG]

    Compared to the neo runtime on Linux, the Windows OpenCL drivers for Intel hardware pull up ahead by ~3.76%.

    Conclusion: On Intel's side of things, their newer neo driver platform is virtually at performance parity with the Windows drivers.

    And with the NVIDIA GeForce GTX 1070 with Max-Q design, here's how its' performance compares on Windows 10 and Ubuntu 18.04LTS:

    On Linux, we get:

    [​IMG]

    And on Windows, the same platform scores as shown:

    [​IMG]

    That's a lead of ~3.55% on the Windows side.

    Conclusion: The Linux & Windows drivers for OpenCL on NVIDIA's side seem to be near feature parity, with a near identical lead as the Windows drivers for Intel's OpenCL have compared to the Linux's neo counterpart.

    And with combined devices:

    When using both OpenCL platforms simultaneously, lets' see if there's a performance parity on Windows vs Linux:

    Linux results first:

    [​IMG]

    And on to Windows 10 build 1803:

    [​IMG]

    Here, we see a marginal lead of ~1.2% on Windows 10.

    Now, what happens when we throw in the wrenches, ie running OpenCL on the processor + the GPUs simultaneously?

    [​IMG]

    Performance predictably increases, to the tune of ~10% when the 6-core, 12-thread Coffeelake-H mobile processor joins in the fray.

    Unlike Pyrit, where ramping up core counts is detrimental to the throughput of discrete accelerators, luxmark takes what it can and ts' workload suffers no penalty.

    Now comes the results for Pyrit.

    In OpenCL mode, using both devices (Intel+ Nvidia) to demonstrate ICD coexistence, here are the results:

    [​IMG]

    And now, with CUDA mode only, here are the results:

    [​IMG]

    Here, we can see that the OpenCL mode is only marginally faster than the CUDA mode because of the small boost by the Intel IGP paired with slighly higher throughput by the NVIDIA card in OpenCL mode.

    Now, what happens when all accelerators are disabled, namely OpenCL + CUDA, and are left with only raw processor power?

    [​IMG]

    Performance predictably tanks to an abyss :)

    On average:

    (a). The OpenCL mode brings about a ~22x speedup compared to processor only mode.

    (b). The CUDA accelerated mode brings about a ~20x speedup compared to processor only mode.

    Enjoy :)
     
  2. Vasudev

    Vasudev Notebook Prophet

    Reputations:
    3,024
    Messages:
    6,132
    Likes Received:
    3,927
    Trophy Points:
    431
  3. Dennismungai

    Dennismungai Notebook Consultant

    Reputations:
    102
    Messages:
    230
    Likes Received:
    166
    Trophy Points:
    56
    Yes,

    I was able to install and retain both ICDs.

    That's why the ICD model exists: To allow for platform coexistence from multiple vendors on the same system.

    With intel's proprietary SDKs, installing them directly on a production system is risky.

    Avoid their proprietary SDKs as much as possible.

    See the documentation abpve on how the build was done.

    I'm going to experiment with FFmpeg's OpenCL filters, see what kind of throughput one can expect.
     
  4. Vasudev

    Vasudev Notebook Prophet

    Reputations:
    3,024
    Messages:
    6,132
    Likes Received:
    3,927
    Trophy Points:
    431
    It'll be slow than windows on nv drivers.
    Sent from my iPhone X Papusan edition using Tapatalk

    So how about nvdia drivers and cuda toolkit and neo packages together and then running ocl-icd neutral package to discover installed icds along with cuda driver.
    On newest kernel nv refuses to work on 4.15. So I've to uninstall everything from nv and install their .run file that contains cuda toolkit and development driver 396.26.
    Currently 390.76 didn't work

    Sent from my iPhone X Papusan edition using Tapatalk
     
  5. Dennismungai

    Dennismungai Notebook Consultant

    Reputations:
    102
    Messages:
    230
    Likes Received:
    166
    Trophy Points:
    56
    Well, I'm on Linux 4.17 (so far).

    No issues encountered.

    You could install cuda first , followed by Neo, and then ocl-icd before building any Ocl apps from source.

    Also, what distribution are you running?

    Concerning performance on both Windows & Linux: With NVIDIA drivers, they pretty much share a common code base, so performance difference between the two should be negligible, all other conditions being constant. My results above also confirm this.

    It's with Intel's case with the Neo compute runtime that intrigued me. In the past, beignet (the now deprecated OpenCL platform driver for Linux, succeeded by Neo) never attained performance parity with Windows. For the first time in a long time, we're seeing the same happen for Intel, and that is good news for GPGPU apps on *nix.
     
    Vasudev likes this.
  6. Vasudev

    Vasudev Notebook Prophet

    Reputations:
    3,024
    Messages:
    6,132
    Likes Received:
    3,927
    Trophy Points:
    431
    I use Xubuntu 16.04.5
     
  7. Dennismungai

    Dennismungai Notebook Consultant

    Reputations:
    102
    Messages:
    230
    Likes Received:
    166
    Trophy Points:
    56
    I see.

    Are you able to build Neo?

    I can't test on 16.04LTS because I upgraded all my hosts to 18.04 three days ago.
     
  8. Vasudev

    Vasudev Notebook Prophet

    Reputations:
    3,024
    Messages:
    6,132
    Likes Received:
    3,927
    Trophy Points:
    431
    I will give it a go today.
     
  9. Vasudev

    Vasudev Notebook Prophet

    Reputations:
    3,024
    Messages:
    6,132
    Likes Received:
    3,927
    Trophy Points:
    431
    Neo was not showing up in clinfo. I can see only Nv and mesa icd. Even uxmal luxmark throws cl error.
    How were you able to install Intel and nv gfx drivers under optimus?

    Sent from my iPhone X Papusan edition using Tapatalk
     
  10. Dennismungai

    Dennismungai Notebook Consultant

    Reputations:
    102
    Messages:
    230
    Likes Received:
    166
    Trophy Points:
    56
    On Ubuntu, I used both Oibaf's and proprietary driver PPAs for the drivers:

    sudo add-apt-repository ppa:eek:ibaf/graphics-drivers -y && sudo add-apt-repository ppa:graphics-drivers/ppa -y
    sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade

    Then, install the latest nvidia driver:

    sudo apt install nvidia-driver-396

    From here, follow up with the build instructions for OpenCL's dependencies: https://gist.github.com/Brainiarc7/dc80b023af5b4e0d02b33923de7ba1ed

    The most important package is ocl-icd. Without it, you're going nowhere in OpenCL.

    Next, build Intel's stack: https://gist.github.com/Brainiarc7/1d13c7f432ba03a8e38720c83cd973d5

    Wish I had a 16.04LTS testbed to test on. Will spin up a few instances later on Digital Ocean and validate the build instructions there.
     
    Vasudev likes this.
Loading...

Share This Page