Binomial workload

Follow this procedure to run a simple binomial options pricing model using MKL.

  • Operating system: Ubuntu* 22.04

  • Hardware: Intel® Data Center Max GPUs

  • Software: Intel® oneAPI Base toolkit, Intel® oneAPI HPC toolkit

  • Time to complete: 15 minutes

For more information the binomial oneMKL sample, see Binomial Sample.

  1. Check whether the driver stack is installed.

    $ xpu-smi discovery
    

    The command should return at least one Intel® Data Center GPU Max device.

  2. Check whether the oneAPI toolkit is installed.

    $ apt list intel-basekit intel-hpckit
    

    Expected output:

    Listing... Done
    intel-basekit/all,now 2023.2.0-49384 amd64 [installed]
    intel-hpckit/all,now 2023.2.0-49438 amd64 [installed]
    
  3. If you previously have not configured your environment, install the Ubuntu 22.04 graphics driver. See dgpu-docs for details.

    Note

    Access to Ubuntu repositories, such as https://repositories.intel.com and https://apt.repos.intel.com, is required for installation. If proxy settings involve changes to environment variables such as http_proxy or https_proxy, small modifications are required in the following steps, such as adding -E (preserve environment) to sudo commands.

  4. If you previously have not configured your environment, enable access to the Intel repo serving the oneAPI packages and install the oneAPI Base toolkit and HPC toolkit for Ubuntu 22.04.

    wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
    echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo  tee /etc/apt/sources.list.d/oneAPI.list
    sudo apt update
    
    sudo apt install -y intel-basekit intel-hpckit
    
  5. Build Binomial options using a oneAPI sample.

    git clone https://github.com/oneapi-src/oneAPI-samples.git
    cd oneAPI-samples/Libraries/oneMKL/binomial
    source /opt/intel/oneapi/setvars.sh 
    make
    
  6. Run Binomial options.

    $./binomial_sycl
    

The following example presents a result snapshot from Intel® Data Center GPU Max 1550:

Double Precision Binomial Option Pricing version 1.8 running on Intel(R) Data Center GPU Max 1550 using DPC++, workgroup size 128, sub-group size 32.
Compiler Version: Intel(R) oneAPI DPC++/C++ Compiler 2023.2.0 (2023.2.0.20230721), LLVM 17.0 based.
Driver Version  : 1.3.26516
Build Time    : Nov  8 2023 21:35:22
Input Dataset   : 8388608
Pricing 8388608 Options with time step of 2048.
...
TEST PASSED