www.intel.com Open in urlscan Pro
2a02:26f0:3500:88e::1ea2  Public Scan

URL: https://www.intel.com/content/www/us/en/developer/articles/technical/onemkl-random-number-generator-device-routines.html
Submission: On April 12 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

Name: hpsform-new /content/www/us/en/search.html

<form class="mega-search-form search item" data-igm-search-control="" name="hpsform-new" id="hpsform-new" action="/content/www/us/en/search.html" role="search" onsubmit="return inputSearch()">
  <button type="submit" class="btn-mega-search icon" aria-label="Search" tabindex="-1">
    <span class="sr-only">Search</span>
    <span class="fa-global-search"></span>
  </button>
  <label for="mobile-search">
    <span class="sr-only">&lt;</span>
    <input id="toplevelcategory" name="toplevelcategory" type="hidden" value="none">
    <input id="query" name="query" type="hidden" value="">
    <input data-tabindex="1" class="form-control" data-search-input="" id="mobile-search" name="keyword" type="text" data-igm-search-input="" title="Search" autocomplete="off" data-target-result="#igm-search-result"
      aria-controls="mega-results-overlay" aria-label="Search Intel.com" placeholder="Search Intel.com">
  </label>
  <button type="button" id="cls-btn-advanced" class="btn-mega-close fa-cancel-1 hide-flyout" aria-label="Clear Search Term" data-clear-input="clear-input">
    <span class="sr-only">Close Search Panel</span>
  </button>
  <button type="button" id="advanced-btn" class="btn-advance-filter fa-sliders hide-flyout" aria-label="Advanced Search Panel" data-mega-advanced-search="advanced-search">
    <span class="sr-only">Advanced Search</span>
  </button>
</form>

Text Content

Skip To Main Content

Toggle Navigation
    
 1. Products
    Products Home
    Processors
       
     * Intel® Core™ Ultra Processors
       
     * Intel® Core™ Processors
       
     * Intel® Xeon® Scalable Processors
       
     * Intel® Xeon® Processors
       
     * Intel® Xeon® CPU Max Series
       
     * Intel Atom® Processors
    
    Select Systems & Devices
       
     * Intel® Evo™ Laptops
       
     * Intel vPro® for Business
       
     * Gaming Systems
       
     * Intel® Arc™ Discrete Graphics
       
     * Intel® Wi-Fi Products
       
     * Thunderbolt™ Technology
       
     * Intel® Unison™ Software
       
     * Chipsets
    
    AI Accelerators
       
     * Intel® Gaudi® AI Accelerators
       
     * AI Software Solutions
       
     * Intel® Geti™ Platform
       
     * Intel® Data Center GPU Max Series
       
     * Intel® Data Center GPU Flex Series
    
    Network to Edge
       
     * Edge and Embedded Processors
       
     * Intel® Ethernet Products
       
     * Intel® Infrastructure Processing Unit (Intel® IPU)
       
     * Intel® Silicon Photonics Optical Transceivers
       
     * Intel® Intelligent Fabric Processors
       
     * Storage Solutions
    
    FPGAs & Programmable Devices
       
     * Intel® FPGAs, CPLDs, and Configuration Devices
       
     * Intel® eASIC™ Structured ASIC Devices
       
     * Intel® Quartus® Development Software & Tools
       
     * Intellectual Property
       
     * Intel FPGA Development Kits
       
     * Acceleration Boards & Platforms
    
    Software
       
     * Trust and Security Solutions
       
     * Performance Solutions
       
     * oneAPI Unified Runtime
       
     * OpenVINO™ Toolkit
       
     * Open Source Projects
       
     * Intel® Developer Catalog

 2. Support
    Drivers & Downloads
       
     * Auto-update your Drivers
       
     * Download Center
    
    Support For
       
     * Products
       
     * Developers
       
     * Suppliers
    
    Resources
       
     * Support Community
       
     * Warranty Information
       
     * Contact Support

 3. Solutions
    Business Solutions
       
     * AI
       
     * 5G
       
     * Business PCs
       
     * Cloud Computing
       
     * Edge Computing
       
     * IOT
       
     * View all >
    
    Consumer Solutions
       
     * Creators
       
     * Gaming
    
    Industry Solutions
       
     * Education
       
     * Financial Services
       
     * Government & Public Sector
       
     * Healthcare & Life Sciences
       
     * Industrial
       
     * Retail
       
     * Transportation
       
     * View all >
    
    Services
       
     * Intel Data Center Manager
       
     * Intel Foundry Services
    
    Resources
       
     * Customer Spotlight
       
     * Technology Tips & Tricks
       
     * Partner Stories
       
     * Intel® Partner Showcase
       
     * Stories
       
     * Intel Blogs

 4. Developers
    Developers Home
    Development Tools
       
     * Software Catalog
       
     * Download Center
       
     * Design Tools and Services
       
     * Software Registration
    
    Topics & Technologies
       
     * Artificial Intelligence
       
     * Client
       
     * Cloud
       
     * Game Development
       
     * Edge, IoT & 5G
       
     * High Performance Computing (HPC)
    
    Resources & Documentation
       
     * Learn
       
     * Communities & Events
       
     * Developer Programs
       
     * Get Help

 5. Partners
    Intel® Partner Alliance
       
     * About Membership
       
     * Already a Member? Login
       
     * Submit a Solution
       
     * Get Help
    
    Intel® Partner Showcase
       
     * Offerings by Category
       
     * Partner Directory
    
    Retail Partner Solutions
 6. Foundry
    Intel Foundry
       
     * World-Class Wafer Foundry
       
     * Advanced Packaging
       
     * Chiplets
       
     * Software and Services
       
     * Design Ecosystem Accelerator Alliances

    
 7. More +
    
    
    

Sign In My Intel
My Tools
   
 * ?

Sign Out
English


SELECT YOUR LANGUAGE

 * Bahasa Indonesia
 * Deutsch
 * English
 * Español
 * Français
 * Português

 * Tiếng Việt
 * ไทย
 * 한국어
 * 日本語
 * 简体中文
 * 繁體中文

Toggle Search
Search < Close Search Panel Advanced Search
close
Sign In to access restricted content


USING INTEL.COM SEARCH

You can easily search the entire Intel.com site in several ways.

 * Brand Name: Core i9
 * Document Number: 123456
 * Code Name: Emerald Rapids
 * Special Operators: “Ice Lake”, Ice AND Lake, Ice OR Lake, Ice*


QUICK LINKS

You can also try the quick links below to see results for most popular searches.

   
 * Product Information
 * Support
 * Drivers & Software


RECENT SEARCHES

Sign In to access restricted content


ADVANCED SEARCH

All of these terms Any of these terms Exact term only Find results with
All Results Product Information Support Drivers & Software Documentation &
Resources Partners Communities Corporate Show results from


ONLY SEARCH IN

Title Description Content ID
Search
Sign in to access restricted content.
 1. Developers
     * Overview
     * Topics & Technologies
     * Artificial Intelligence
     * Overview
     * Frameworks
     * AI Development Software
     * Reference Kits
     * Performance Data
     * Courses
     * Technical Library
     * Support
     * Client Applications
     * Business
     * Cloud to PC
     * Cloud
     * Overview
     * Tools
     * Library
     * Performance Benchmarks
     * Community
     * GPU Research
     * Researchers
     * Publications
     * Samples
     * Edge Computing
     * Overview
     * Tools
     * FlexRAN™ Reference Architecture
     * Documentation
     * Intel® Kiosk Peripheral Management Utility
     * Open AMT Cloud Toolkit
     * Learn
     * Edge Insights for Industrial
     * Go to Market with the OpenVINO™ Toolkit
     * Optimized Inference at the Edge
     * Self-Paced Training for the OpenVINO™ Toolkit
     * Community
     * Hardware
     * All Hardware
     * AIxboard Developer Kit
     * Developer Kits with Intel® Core™ Ultra Processors
     * Developer Kits with Intel Atom® x7000E Processors
     * Developer Kits with 14th Generation Intel® Core™ Processors
     * Developer Kits with 13th Generation Intel® Core™ Processors
     * Developer Kits Based on 12th Generation Intel® Core™ Processors
     * Developer Kits Based on 11th Generation Intel® Core™ Processors
     * Developer Kits Based on 10th Generation Intel® Core™ Processors
     * Hinj* IoT Sensor Hub Development Kit
     * Intel® Cyclone® 10 LP FPGA
     * Intel® IoT RFP Ready Kits
     * Intel® Movidius™ VPU
     * Intel vPro® Platform for Retail
     * Kits with Intel® Xeon® D-2100 Processors
     * Developer Kits with 4th Gen Intel® Xeon® Processors
     * MinnowBoard Turbot*
     * Nezha Developer Kit
     * Snō + SnōMākr Development Kit
     * Terasic DE10-Nano Kit
     * XLR8* Development Board
     * Edge Solutions
     * Edge Insights for Vision
     * Edge Insights for Industrial (EII)
     * Edge Controls for Industrial (ECI)
     * Edge Insights for Fleet (EIF)
     * Edge Insights for Autonomous Mobile Robots (EI for AMR)
     * Recommended Hardware
     * Edge AI Reference Kits
     * Smart Meter Scanning
     * Intelligent Queue Management
     * Technical Library
     * GameDev
     * Tools
     * Technical Library
     * Partners
     * HPC
     * Overview
     * Technical Library
     * Data Center
     * Tools & Libraries
     * Firmware
     * coreboot*
     * Intel® Intelligent Test System
     * Unified Extensible Firmware Interface (UEFI)
     * SMI Transfer Monitor
     * Networking
     * Data Plane Development Kit
     * Learn
     * Open Ecosystem
     * Projects
     * ACPI Component Architecture (ACPICA)
     * Assistive Context-Aware Toolkit (ACAT)
     * Celadon
     * C for Metal SDK
     * pm-graph
     * Features
     * Resources
     * Intel® Kernel Guard Technology
     * Linux* Kernel Performance
     * Key Management Reference Application
     * Multi-Rail Power Sequencer and Monitor
     * Open Data Center Diagnostic Project 🡭
     * OP-TEE* for Intel® Architecture
     * Linux* Stacks for Intel® Software Guard Extensions
     * Intel® vCMTS Reference Dataplane
     * Intel® x86 Architecture Distribution of Trusty* OS
     * Open Source Media Framework
     * Resources
     * NumaTOP
     * Intel® QuickAssist Technology
     * Resources
     * Graphics Numerical Hardware
     * Guides & Tutorials
     * News & Events
     * Participate
     * Team
     * Persistent Memory
     * Library
     * Intel® Platform Analysis Technology
     * Runtime Languages
     * Software Security Guidance
     * Advisory Guidance
     * Best Practices
     * Resources
     * Disclosure Documentation
     * Feature Documentation
     * More Information
     * Storage
     * Tools
     * Software Catalog
     * Containers
     * About
     * oneAPI
     * Overview
     * Data Parallel C++/SYCL*
     * Toolkits
     * Intel® oneAPI Base Toolkit
     * Overview
     * Download
     * Documentation
     * Intel® HPC Toolkit
     * Overview
     * Download
     * Documentation
     * Intel® oneAPI IoT Toolkit
     * Overview
     * Download
     * Documentation
     * Intel® Rendering Toolkit
     * Overview
     * Download
     * Documentation
     * AI Tools
     * Overview
     * Download
     * Documentation
     * Intel® System Bring-up Toolkit
     * Documentation
     * Intel® oneAPI DL Framework Developer Toolkit
     * Documentation
     * Tech Articles & How-Tos
     * Library
     * News Updates
     * Webinars
     * Components
     * All Components
     * Intel® oneAPI Collective Communications Library
     * Documentation
     * Intel® oneAPI Data Analytics Library
     * Download
     * Documentation
     * Intel® oneAPI Deep Neural Network Library
     * Overview
     * Documentation
     * Intel® oneAPI DPC++/C++ Compiler
     * Documentation
     * Legacy Intel® C++ Compiler Documentation
     * Intel® oneAPI DPC++ Library
     * Documentation
     * Intel® oneAPI Math Kernel Library
     * Download
     * Documentation
     * LAPACK Function Finding Advisor
     * Link Line Advisor
     * Intel® oneAPI Threading Building Blocks
     * Documentation
     * Intel® Video Processing Library
     * Documentation
     * Intel® Advisor
     * Documentation
     * Intel® Cluster Checker
     * Documentation
     * Intel® Distribution for GDB*
     * Documentation
     * Intel® Distribution of Modin*
     * Documentation
     * Intel® Distribution for Python*
     * Intel® DPC++ Compatibility Tool
     * Documentation
     * Intel® Embree
     * Intel® Extension for Scikit-learn*
     * Intel® FPGA Add-on for oneAPI Base Toolkit
     * Documentation
     * Intel® Fortran Compiler
     * Documentation
     * Intel® Inspector
     * Documentation
     * Intel® Integrated Performance Primitives
     * Documentation
     * Intel® MPI Library
     * Documentation
     * Pinning Simulator
     * Intel® Neural Compressor
     * Intel® Open Image Denoise
     * Intel® Open Volume Kernel Library
     * Intel® OpenSWR
     * Intel® Extension for PyTorch*
     * Documentation
     * Intel® Extension for TensorFlow*
     * Download from TensorFlow*
     * Download the Intel® Extension for TensorFlow*
     * Intel® Optimization for XGBoost*
     * Documentation
     * Tutorials
     * Code Samples
     * Intel® OSPRay
     * Intel® Trace Analyzer and Collector
     * Documentation
     * Intel® VTune™ Profiler
     * Download
     * Documentation
     * Intel® AI Reference Models
     * Code Samples
     * Training
     * Overview
     * Catalog
     * Academic Program
     * Educator
     * Student Ambassador
     * Innovator
     * Centers of Excellence
     * Experts
     * Developer Summit
     * Essentials of SYCL*
     * FPGA Development Flow Using Intel® oneAPI Base Toolkit
     * Heterogeneous Programming Using Numba-Data Parallel Python*
     * AI Tools Samples Workflow
     * Intel® oneAPI Math Kernel Library (oneMKL) Essentials
     * Machine Learning using oneAPI
     * Migrate from CUDA* to C++ with SYCL*
     * OpenMP* Offload Basics
     * Optimize GPU Apps with the Intel® oneAPI Base Toolkit
     * Intel® OSPRay Essentials
     * Performance, Portability & Productivity
     * Workflow for a CUDA* to SYCL* Migration
     * Documentation
     * oneAPI Programming Guide
     * Installation Guides
     * Supported Hardware
     * Industry Adoption
     * Ecosystem Support
     * Support
     * Priority Support for Intel® oneAPI Base Toolkit
     * Priority Support for Intel® oneAPI Base & HPC Toolkit
     * Priority Support for Intel® oneAPI Base & IoT Toolkit
     * Priority Support for Intel® oneAPI Base & Rendering Toolkit
     * FPGA
     * Intel® Active Management Technology SDK
     * Features
     * Intel® Collaboration Suite for WebRTC SDK
     * Download
     * Intel® Developer Cloud
     * For the Edge
     * What's New
     * Bare Metal
     * Documentation & Resources
     * Intel® Distribution of OpenVINO™ Toolkit Guide
     * Sample Apps
     * Solution Briefs
     * FAQ
     * Hardware
     * Intel® Edge AI Certification
     * Ecosystem Partners
     * Testimonials
     * For oneAPI
     * For AI and HPC
     * Training Portal (Beta)
     * Intel® Distribution of OpenVINO™ Toolkit
     * What's New
     * Get Started
     * Industry
     * AI PC
     * Download
     * Documentation
     * System Requirements
     * Knowledge Base
     * Certification
     * Intel® Dynamic Application Loader
     * Technology Details
     * SDK
     * Get Started
     * Frameworks
     * Intel® Game Dev AI Toolkit
     * Intel® Graphics Performance Analyzers
     * Graphics Frame Analyzer
     * Graphics Trace Analyzer
     * System Analyzer
     * Download
     * Get Started
     * Training
     * Forum
     * Intel® Homomorphic Encryption Toolkit
     * Intel® In-Band Manageability
     * Use Cases
     * Documentation
     * Intel® Integrated Simulation Infrastructure with Modeling
     * Instruction Set Architecture (ISA) Extensions
     * Intel® Intelligent Storage Acceleration Library (Intel® ISA-L)
     * Intel® ISA-L on GitHub*
     * Intel® ISA-L for Cryptography on GitHub*
     * Intel® Media SDK
     * OpenCL™ Runtime
     * Pin
     * Intel® Platform Analysis Library
     * Intel Tools for OpenCL™ Applications
     * Runtimes (GPU, CPU)
     * Intel® Smart Edge Open
     * Documentation
     * Intel® Software Guard Extensions
     * Download
     * Attestation & Provisioning Services
     * Get Started
     * Training
     * Documentation
     * Intel® SGX SDK for Linux OS*
     * Commercial License Request
     * Forum
     * Intel® Secure Device Onboard
     * Intel® Software Development Emulator
     * Intel® Trust Domain Extensions (Intel® TDX)
     * Overview
     * Documentation
     * Intel® Quantum SDK
     * Intel® Query Processing Library (Intel® QPL)
     * Resellers
     * Resources & Documentation
     * Tuning Guides
     * Installation Guides
     * Programming Guides
     * Learn
     * MLOps Certification
     * Community & Events
     * Events
     * DevCon On Demand
     * Kubecon
     * Open Source Summit Europe
     * Parallel Universe Magazine
     * Intel® Student Ambassadors
     * Intel® Software Innovators
     * Developer Programs
     * Overview
     * Intel® FPGA Academic Program
     * Membership
     * Boards
     * Materials
     * Artificial Intelligence
     * Computer Organization
     * Computer Systems
     * Digital Logic
     * Embedded Systems
     * Heterogeneous Computing
     * IP Cores
     * SD Card Images
     * Tutorials
     * Workshops
     * Research
     * Support
     * Get Help
     * Product Support
     * Software Product Forums
     * Hardware Product Forums
     * Priority Support
     * FPGA Support
     * Frequently Asked Questions
     * Licensing
     * Priority Support
     * Purchasing, Renewing, and Upgrading
     * Downloading
     * Installation
     * Registration

 2. Tools
     * Software Catalog
     * oneAPI
     * FPGA
     * Intel® Active Management Technology SDK
     * Intel® Collaboration Suite for WebRTC SDK
     * Intel® Developer Cloud
     * Intel® Distribution of OpenVINO™ Toolkit
     * Intel® Dynamic Application Loader
     * Frameworks
     * Intel® Game Dev AI Toolkit
     * Intel® Graphics Performance Analyzers
     * Intel® Homomorphic Encryption Toolkit
     * Intel® In-Band Manageability
     * Intel® Integrated Simulation Infrastructure with Modeling
     * Instruction Set Architecture (ISA) Extensions
     * Intel® Intelligent Storage Acceleration Library (Intel® ISA-L)
     * Intel® Media SDK
     * OpenCL™ Runtime
     * Pin
     * Intel® Platform Analysis Library
     * Intel Tools for OpenCL™ Applications
     * Intel® Smart Edge Open
     * Intel® Software Guard Extensions
     * Intel® Secure Device Onboard
     * Intel® Software Development Emulator
     * Intel® Trust Domain Extensions (Intel® TDX)
     * Intel® Quantum SDK
     * Intel® Query Processing Library (Intel® QPL)
     * Resellers

 3. oneAPI
     * Overview
     * Data Parallel C++/SYCL*
     * Toolkits
     * Tech Articles & How-Tos
     * Components
     * Code Samples
     * Training
     * Documentation
     * Industry Adoption
     * Support

 4. Components
     * All Components
     * Intel® oneAPI Collective Communications Library
     * Intel® oneAPI Data Analytics Library
     * Intel® oneAPI Deep Neural Network Library
     * Intel® oneAPI DPC++/C++ Compiler
     * Intel® oneAPI DPC++ Library
     * Intel® oneAPI Math Kernel Library
     * Intel® oneAPI Threading Building Blocks
     * Intel® Video Processing Library
     * Intel® Advisor
     * Intel® Cluster Checker
     * Intel® Distribution for GDB*
     * Intel® Distribution of Modin*
     * Intel® Distribution for Python*
     * Intel® DPC++ Compatibility Tool
     * Intel® Embree
     * Intel® Extension for Scikit-learn*
     * Intel® FPGA Add-on for oneAPI Base Toolkit
     * Intel® Fortran Compiler
     * Intel® Inspector
     * Intel® Integrated Performance Primitives
     * Intel® MPI Library
     * Intel® Neural Compressor
     * Intel® Open Image Denoise
     * Intel® Open Volume Kernel Library
     * Intel® OpenSWR
     * Intel® Extension for PyTorch*
     * Intel® Extension for TensorFlow*
     * Intel® Optimization for XGBoost*
     * Intel® OSPRay
     * Intel® Trace Analyzer and Collector
     * Intel® VTune™ Profiler
     * Intel® AI Reference Models

 5. Intel® oneAPI Math Kernel Library
     * Download
     * Documentation
     * LAPACK Function Finding Advisor
     * Link Line Advisor

 6. oneMKL RNG Offload SYCL Device API Routine

The browser version you are using is not recommended for this site.
Please consider upgrading to the latest version of your browser by clicking one
of the following links.

 * Safari
 * Chrome
 * Edge
 * Firefox


ONEMKL RANDOM NUMBER GENERATOR DEVICE ROUTINES



 * Using SYCL* for GPU Offload of Monte Carlo Based Financial Services Workloads
 * The Need for More Flexible Parallel Compute Power
 * RNG Device API Basics
 * American Monte Carlo Options Pricing Model
 * European Monte Carlo Options Pricing Model
 * Use oneMKL RNG Device API Routines to Your Advantage
 * Additional Resources






GET THE LATEST ON ALL THINGS CODE

Sign Up


Andrey Fedorov 

Math Algorithm Engineer

Gennady Fedorov 

Software Technical Consulting Engineer

Vladimir Polin

AI Software Solutions Engineer

Robert Mueller-Albrecht

Product Marketing Engineer

 

Intel Corporation





By

Andrey Fedorov 

Math Algorithm Engineer

Gennady Fedorov 

Software Technical Consulting Engineer

Vladimir Polin

AI Software Solutions Engineer

Robert Mueller-Albrecht

Product Marketing Engineer

 

Intel Corporation


USING SYCL* FOR GPU OFFLOAD OF MONTE CARLO BASED FINANCIAL SERVICES WORKLOADS


THE NEED FOR MORE FLEXIBLE PARALLEL COMPUTE POWER

The Basel Committee on Banking Supervision* (BCBS) forecasts a four- to
twentyfold increase in compute demand due to the increasing need for financial
risk mitigation measures. These include advanced market prediction algorithms
and risk simulations to understand better asset volatility associated with
climate change, supply chain disruption, and geopolitical changes.

Software developers in the Banking and Financial Services Industry (FSI) rely on
high-performance computing (HPC) environments with GPU-based acceleration to
implement these risk simulation models. The challenge they face is that the wide
deployment of these workloads makes it paramount that they can be run on a large
variety of hardware platform configurations. Before the Unified Acceleration
(UXL) Foundation’s efforts and the ever-increasing popularity of SYCL*, they
faced substantial obstacles and inefficiencies caused by the need to port and
refactor code every time a workload had to be deployed in a new environment.

The Monte Carlo method is a well-known method in finance, relying on highly
performant random number generation as seeds for its simulation scenarios. It is
mainly used for option pricing as the expected return on investment (ROI) is
often too complex to compute directly, especially with exotic options.

American and European Options are two widely used Monte Carlo simulation methods
to predict the probability of various option investment outcomes.

Since the introduction of the C++ with SYCL-based oneAPI Math Kernel Library
(oneMKL) Interfaces in 2020, this component of the oneAPI specification and open
source extension of the Intel® oneAPI Math Kernel Library provides Data Parallel
C++ interfaces for Random Number Generators (RNG) routines implementing commonly
used pseudorandom, quasi-random, and non-deterministic generators with
continuous and discrete distributions.

Just as some other oneMKL function domains, as a part of its implementation,
oneMKL RNG includes:

 1. Manual offload functionality (Random Number Generators Host API)
 2. Device functionality as a set of functions callable directly from SYCL
    kernels (Random Number Generators Device Routines).

We will show how oneMKL Random Number Generators (RNG) Device API helps
you significantly increase the computation performance on Intel® Data Center
GPUs by a factor of 2, compared to the Host API implementation on the same
hardware.

In addition, we will use American Options Pricing using the Monte Carlo
algorithm as an example to demonstrate migrating financial workloads from
proprietary CUDA code to the open, multi-platform SYCL programming model using
SYCLomatic (or the Intel® DPC++ Compatibility Tool).

Results were achieved on Intel® Data Center GPU Max 1550 with the oneAPI 2024.0
release.




RNG DEVICE API BASICS

The main purpose of device interfaces is to make them callable from SYCL
kernels. It brings an essential performance boost because submitting time may
greatly affect the overall execution time of the application.  The idea is to
get random numbers on the fly and process them in the same kernel without paying
for global memory transfer. For example,

Host API:

auto engine = oneapi::mkl::rng::mrg32k3a(*stream, 1ull);
oneapi::mkl::rng::generate(oneapi::mkl::rng::gaussian<double>(0.0, 1.0),
                           engine, n, d_samples);

sycl_queue.parallel_for(
    sycl::nd_range<3>(sycl::range<1>(n_groups) * sycl::range<1>(n_items),
                      sycl::range<1>(n_items)),
    [=](sycl::nd_item<1> item_1) {
        post_processing_kernel(d_samples);
    }).wait();


 

Device API:

sycl_queue.parallel_for(
    sycl::nd_range<3>(sycl::range<1>(n_groups) * sycl::range<1>(n_items),
                      sycl::range<1>(n_items)),
    [=](sycl::nd_item<1> item_1) {
        oneapi::mkl::rng::device::mrg32k3a<1> engine_device(1ull, n);
        oneapi::mkl::rng::device::gaussian<double> distr(0.0, 1.0);
        double rng_val = oneapi::mkl::rng::device::generate(distr, engine_device);

        post_processing_kernel(rng_val);
    }).wait();


 

Since the host interface call takes at least one SYCL kernel, it is easy to see
that the number of kernels required for the implementation when using the Device
API is smaller than the Host API. The RNG Device API is also available as a part
of oneAPI Math Kernel Library (oneMKL) Interfaces, an open-source project that
can be found on GitHub.

Let us consider American and European Monte Carlo workloads separately.


AMERICAN MONTE CARLO OPTIONS PRICING MODEL

To run this benchmark on an Intel® GPU, we took the original code from the
NVIDIA* Developer Code Samples GitHub repository. We then migrated the native
CUDA* GPU code to SYCL using the  SYCLomatic Open-Source Project (SYCLomatic).
This tool is included in the Intel® oneAPI Base Toolkit or available from GitHub
under the Apache* 2.0 license. SYCLomatic allows us to port the original CUDA
code to SYCL and migrates about 95% of the native code automatically to SYCL
code.

Please find step-by-step instructions for the migration of the American Monte
Carlo Options Pricing Model example source code to SYCL, and inspect the SYCL
enabled example source code project in the GitHub repository.

To finish the process, we made some manual code changes and tuned it to the
desired level of performance for our target architecture.

Additionally, after completing the SYCLomatic migration, we added a host
interface call. To reduce the number of SYCL kernels used, we added device calls
to the next kernel (generate_paths_kernel). This way, we reduce the number of
kernels needed and remove the need for extra memory to store random numbers, as
we use these numbers as soon as they are generated.

Applying the Device API interface capability, we obtain up to 2.13 times
performance speed-up compared with traditional host interface calls. We observed
a ~15% performance improvement for the overall application speed-up.

Figure 1 shows the performance scalability of American Monte Carlo benchmark
results depending on the number of calculated paths. The “RNG & Next Kernel
Speedup” curve shows the performance increase of combining RNG device API and
generate_paths_kernel usage compared to the Host API version using RNG Host
interface calls and  generate_paths_kernel separately. “Full Benchmark Workload
Speedup” shows overall the benchmark benefits of using RNG Device API compared
to RNG Host API usage.



Figure 1. American Monte Carlo Scalability Results.

 


EUROPEAN MONTE CARLO OPTIONS PRICING MODEL

Let us also consider the performance of the European Monte Carlo Options Sample
that is available on the oneAPI Samples GitHub. Replacing the Device API with
the Host and modeling for a duration of 1 year, the option_years variable can be
set to 1. After this consideration we can easily replace device calls with a
host call as a separate SYCL kernel. However, we need extra memory to store
generated numbers.

Applying those changes, we found that operating memory on the GPU is
insufficient to store ~100 000 000 000 double precision numbers. So, we decided
to reduce the number of paths to 16000, so we let the code run successfully.



Figure 2 shows how the RNG Device API usage allows users to obtain a 3.69 times
performance improvement for the whole European Monte Carlo benchmark compared to
RNG Host API.


USE ONEMKL RNG DEVICE API ROUTINES TO YOUR ADVANTAGE

Device API allows users to achieve an essential performance boost compared to
Host interfaces but requires much more coding and knowledge about specific
domain implementations. It is also a more flexible API since users can control
the parameters of SYCL parallel routines.

Results in this article can be applied to other applications (not only
financial) that have calculations of random numbers on the critical performance
path.

Addressing challenges is a regular process for Intel® Compiler and Intel® oneMKL
software development teams. To make Intel Software better for our customers. We
are constantly looking for both more efficient algorithms and better
optimization techniques.

To get started now, look at the Intel® oneAPI Math Kernel Library, the oneAPI
Math Kernel Library (oneMKL) Interfaces project, and SYCLomatic.


ADDITIONAL RESOURCES

 * Intel® oneAPI Math Kernel Library
 * oneAPI Math Kernel Library (oneMKL) Interfaces
 * SYCLomatic
 * Intel® DPC++ Compatibility Tool
 * Unified Acceleration (UXL) Foundation

 

Notices & Disclaimers

Performance varies by use, configuration, and other factors. Learn more on the
Performance Index site.

Performance results are based on testing as of dates shown in configurations and
may not reflect all publicly available updates.  See backup for configuration
details.  No product or component can be absolutely secure.

Your costs and results may vary.

Intel technologies may require enabled hardware, software or service activation.

© Intel Corporation.  Intel, the Intel logo, and other Intel marks are
trademarks of Intel Corporation or its subsidiaries.  Other names and brands may
be claimed as the property of others.

*Other names and brands may be claimed as the property of others.




1




PRODUCT AND PERFORMANCE INFORMATION

1

Performance varies by use, configuration and other factors. Learn more
at www.Intel.com/PerformanceIndex.


Get Help
<link rel="stylesheet"
href="/etc.clientlibs/settings/wcm/designs/ver/240318/intel/clientlibs/pages/get-help.min.css"
type="text/css">
 * Company Overview
 * Contact Intel
 * Newsroom
 * Investors
 * Careers
 * Corporate Responsibility
 * Diversity & Inclusion
 * Public Policy

 * 
 * 
 * 
 * 
 * 

 * © Intel Corporation
 * Terms of Use
 * *Trademarks
 * Cookies
 * Privacy
 * Supply Chain Transparency
 * Site Map
 * Your Privacy Choices California Consumer Privacy Act (CCPA) Opt-Out Icon
 * Notice at Collection
 * Recycling

Intel technologies may require enabled hardware, software or service activation.
// No product or component can be absolutely secure. // Your costs and results
may vary. // Performance varies by use, configuration and other factors. // See
our complete legal Notices and Disclaimers. // Intel is committed to respecting
human rights and avoiding causing or contributing to adverse impacts on human
rights. See Intel’s Global Human Rights Principles. Intel’s products and
software are intended only to be used in applications that do not cause or
contribute to adverse impacts on human rights.


<link rel="stylesheet"
href="/etc.clientlibs/settings/wcm/designs/ver/240318/intel/clientlibs/pages/commons-page.min.css"
type="text/css"><script
src="/etc.clientlibs/settings/wcm/designs/ver/240318/intel/clientlibs/pages/commons-page.min.js"
defer></script> <link rel="preload"
href="/etc.clientlibs/settings/wcm/designs/ver/240318/intel/clientlibs/pages/contact-us.min.css"
as="style"><link rel="stylesheet"
href="/etc.clientlibs/settings/wcm/designs/ver/240318/intel/clientlibs/pages/contact-us.min.css"
type="text/css"> <script>!function(){var
e=setInterval(function(){"undefined"!=typeof
$CQ&&($CQ(function(){CQ_Analytics.SegmentMgr.loadSegments("/etc/segmentation"),CQ_Analytics.ClientContextUtils.init("/etc/clientcontext/intel",window.location.pathname.substr(0,window.location.pathname.indexOf(".")))}),clearInterval(e))},100)}();</script>
<link rel="preload" as="style"
href="/etc.clientlibs/settings/wcm/designs/intel/us/en/css/resources/css/intel.rwd.override.css"/>
<link rel="stylesheet" type="text/css"
href="/etc.clientlibs/settings/wcm/designs/intel/us/en/css/resources/css/intel.rwd.override.css"/>


WELCOME!

Intel Corporation uses cookies and similar technologies on this website to
improve your online experience, to analyze site usage and to show tailored
advertising to you. You can manage cookies at any time by clicking on the
'Manage Cookie Settings' option. For more information, visit our Cookie Notice.
Manage Cookie Settings Deactivate Cookies Activate Cookies



MANAGE COOKIES SETTINGS




 * INFORMATION WE COLLECT


 * STRICTLY NECESSARY COOKIES


 * ANALYTICS


 * FUNCTIONAL


 * AD TARGETING


 * DATA TRANSFER


 * DATA SHARING

INFORMATION WE COLLECT

Intel values your privacy. Our Sites use Cookies and Similar Technologies on
this website to improve your online experience, to analyze site usage, and to
show tailored advertising to you. This consent management tool will help you
understand what information is being collected and give you control over how it
is being used.

Information Our Partners Collect
Details of the vendors that we use to improve your overall web browsing
experience are provided in the tool. They use Cookies and Similar Technologies
to connect you with your social networks and tailor advertising to better match
your interests.

Your Choices
You can manage your cookie settings by visiting the Analytics, Functional, and
Ad Targeting tabs on the left.

Intel Privacy Notice
Intel Cookie Notice

STRICTLY NECESSARY COOKIES

Always Active

These technologies are necessary for the Intel experience to function and cannot
be switched off in our systems. The technology is usually only set in response
to actions made by the device owner which amount to a request for services, such
as setting privacy preferences, logging in, filling in forms, maintaining secure
login areas, maintaining state across pages (remembering items in a shopping
basket), and server load balancing. The device owner can set their preference to
block or alert Intel about these technologies, but some parts of the Intel
experience will not work. These technologies do not store any personally
identifiable information.

Cookies Details‎

ANALYTICS

Analytics Inactive


These technologies allow Intel to count device visits and traffic sources, so
Intel can measure and improve the performance of our experiences. The technology
helps Intel to know which experiences are the most and least popular and see how
device owners interact with the experience. All information these technologies
collect is aggregated. If the device owner does not allow these technologies,
then Intel will not know when the device owner visited or how the device owner
interacted with our experiences.

Cookies Details‎

FUNCTIONAL

Functional Inactive


These technologies enable the Intel experience to provide enhanced functionality
and personalization. The technology may be set by Intel or by third-party
providers whose services Intel have added to our experiences. If the device
owner does not allow these technologies, then some or all of these services may
not function properly for the device owner.

Cookies Details‎

AD TARGETING

Ad Targeting Inactive


These technologies may be set through our Intel experience or by our advertising
partners. The technology may be used to build a profile of the device owner’s
interests and show the device owner relevant advertisements on other
experiences. The technology does not store directly personal information on the
device, but the technology is based on uniquely identifying the device. If the
device owner does not allow these technologies, then the device owner will
experience less targeted advertising.

Cookies Details‎

DATA TRANSFER

Data Transfer Inactive


You consent to allowing Intel to transfer your personal information outside of
China for processing based upon Intel's Privacy and Cookies notices as well as
the Intel Privacy Notice Supplement for Users in China.

Cookies Details‎

DATA SHARING

Data Sharing Inactive


You consent to Intel sharing your personal information with Intel's affiliates,
Intel's partners, and Intel-authorized third-party personal information
processors.

Cookies Details‎
Back Button


COOKIE LIST

Filter Button
Consent Leg.Interest
checkbox label label
checkbox label label
checkbox label label

Clear
checkbox label label
Apply Cancel
Confirm My Choices
All Inactive All Active