Developer Guide and Reference

  • 2021.2
  • 03/26/2021
  • Public Content

Command Line Options Reference

This topic shows the command line options and their descriptions.

Command Line Options Reference

Always create
with the async exception handler. Default:
Insert comments explaining the generated code. Default:
The directory path of the CUDA* header files.
Use a C++17 class template argument deduction (CTAD) in your generated code.
Additional argument to append to the migration command line, example:
--extra-arg="-I /path/to/header"
. The options that can be passed this way can be found with the
dpct -- -help
Sets the range of formatting.
The values are:
  • =migrated
    : Only formats the migrated code (default).
  • =all
    : Formats all code.
  • =none
    : Do not format any code.
Sets the formatting style.
The values are:
  • =llvm
    : Use the LLVM coding style.
  • =google
    : Use the Google* coding style.
  • =custom
    : Use the coding style defined in the
    file (default).
Example for the .clang-format file content:
BasedOnStyle: LLVM IndentWidth: 4 TabWidth: 4 UseTab: ForIndentation
Provides list of Intel® DPC++ Compatibility Tool specific options.
The directory path for the root of the source tree that needs to be migrated. Only files under this root are migrated. Default:
  • The current directory, if the input source files are not provided.
  • The directory of the first input source file, if the input source files are provided.
Any source within the directory specified by
(at any nesting level) may be migrated. Any header file within the directory specified by
(at any nesting level) included by the source or header file, which is being migrated, is also migrated. Files from outside the
directory are considered system files and they will not be migrated even if they are included by any of the program source files.
Keeps the original code in the comments of generated Data Parallel C++ (DPC++) files. Default:
Do not use cl namespace (
) inlining. Default:
Do not use a Don’t Repeat Yourself (DRY) pattern when functions from the
namespace are inserted. Default:
The directory path for root of generated files. A directory is created if it does not exist. Default:
The relative paths for the generated files are maintained, and the extension is changed as follows:
  • *.cu → *.dp.cpp
  • *.cpp → *.cpp.dp.cpp
  • *.cc → *.cc.dp.cpp
  • *.cxx → *.cxx.dp.cpp
  • *.C → *.C.dp.cpp
  • *.cuh → *.dp.hpp
  • *.h *.hpp *.hxx
    → extensions are kept the same
Redirects the
output to
in the output directory specified by the
Sets the output verbosity level:
  • =silent
    : Only messages from clang.
  • =normal
    : ‘silent’ and warnings, errors, and notes from the Intel® DPC++ Compatibility Tool.
  • =detailed
    : ‘normal’ and messages about which file is being processed.
  • =diagnostics
    : ‘detailed’ and information about the detected conflicts and crashes (default).
The directory path for the compilation database (
). When no path is specified, a search for
is attempted through all parent directories of the first input source file.
Migrates/copies all files from the
directory to the
directory. The
option should be explicitly specified. Default:
Prefix for the report file names. The full file name will have a suffix derived from the
and an extension derived from the
. For example:
. If this option is not specified, the report goes to
. The report files are created in the directory, specified by
Format of the reports:
  • =csv
    : The output is lines of comma separated values. The report name extension will be
  • =formatted
    : The output is formatted for easier human readability. The report file name extension is
Only reports are generated. No DPC++ code is generated. Default:
Comma separated list of report types:
  • =apis
    : Information about API signatures that need migration and the number of times they were encountered. The report file name has the
    suffix added.
  • =stats
    : High level migration statistics: Lines Of Code (LOC) that are migrated to DPC++, LOC migrated to DPC++ with helper functions, LOC not needing migration, LOC needing migration but are not migrated. The report file name has the
    suffix added (default).
  • =all
    : All of the reports.
Stop migration and generation of reports if parsing errors happened. Default:
Comma separated list of migration warnings to suppress. Valid warning IDs range from 1000 to 1047. Hyphen-separated ranges are also allowed. For example:
Suppresses all migration warnings. Default:
Generates kernels with the kernel name. Default:
Sets the Unified Shared Memory (USM) level to use in source code generation:
  • =restricted
    : Uses API from DPC++ Explicit and Restricted Unified Shared Memory extension for memory management migration (default).
  • =none
    : Uses helper functions from Intel® DPC++ Compatibility Tool header files for memory management migration.
The file path of
Shows the version of the tool.
Specifying any of these options will trigger report generation.
  • --report-file-prefix
  • --report-type
  • --report-format
  • --report-only

Source Files

To work with source files use
<source0> ...
to create paths for your input source files. These paths can be found in the compilation database.
  • Migrate single source file:
    dpct source.cpp
  • Migrate single source file with C++11 features:
    dpct --extra-arg="-std=c++11" source.cpp
  • Migrate all files available in compilation database:
    dpct -p=<path to location of compilation database file>
  • Migrate one file in compilation database:
    dpct -p=<path to location of compilation database file> source.cpp

Product and Performance Information


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