Developer Guide and Reference

  • 2021.4
  • 09/27/2021
  • Public Content

Migrate a Project

The Intel® DPC++ Compatibility Tool can be used to transform programs composed of multiple source and header files.

Before You Begin

If you have not already done so, set up your CLI environment by sourcing the setvars script located in the root of your toolkit installation.
  • On Linux* (sudo):
    source /opt/intel/oneapi/
  • On Linux (user):
    source ~/intel/oneapi/
  • On Windows*:
    C:\Program Files(x86)\Intel\oneAPI\setvars.bat
The Intel® DPC++ Compatibility Tool comes with several different samples to allow you to explore the tool and familiarize yourself with how it functions. The following examples use the samples outlined in the table below.
For more information on how to download and access the samples, visit the Intel® oneAPI Base Toolkit Get Started Guides:
For more detailed information on the purpose and usage of the test samples, locate the README file provided for each sample.
Test Samples
Vector Add DPCT
This sample demonstrates how to migrate a simple program from CUDA to Data Parallel C++. Vector Add provides an easy way to verify that your development environment is setup correctly to use the Intel® DPC++ Compatibility Tool (dpct)
Folder Options DPCT
  • bar/
  • bar/util.h
This sample provides an example of how to migrate more complex projects and use options.
Rodinia NW DPCT
  • needle.h
This project demonstrates how to migrate a Make/CMake* project from CUDA to Data Parallel C++ (DPC++) using the Intel® DPC++ Compatibility Tool.
Emitted Warnings
The Intel® DPC++ Compatibility Tool notes the places in the code that may require your attention during the migration of the files in order to make the code DPC++ compliant or correct. Comments are inserted into the generated source files and displayed as warnings in the output. For more details on what a particular warning means, see the Diagnostics Reference. An example is below:
/path/to/file.hpp:26:1: warning: DPCT1003:0: Migrated API does not return error code. (*,0) is inserted. You may need to rewrite this code. // source code line for which warning was generated ^

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at