Intel® DPC++ Compatibility Tool Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Alphabetical Option List
The following table lists Intel® DPC++ Compatibility Tool command line options in alphabetical order.
| Option | Description | 
|---|---|
| --always-use-async-handler | Use async exception handler when creating new sycl::queue with dpct::create_queue in addition to default dpct::get_default_queue. Default: off. | 
| --analysis-mode | Only generate a report for porting effort. Default: off. | 
| --analysis-mode-output-file | Specifies the file where the analysis mode report is saved. Default: Output to stdout. | 
| --analysis-scope-path=<dir> | The directory path for the analysis scope of the source tree that needs to be migrated. Default: the value of --in-root. | 
| --assume-nd-range-dim=<value> | Provides a hint to the tool on the dimensionality of nd_range to use in generated code. The values are: 
 | 
| --build-script-file=<file> | Specifies the name of generated makefile for migrated file(s). Default name: Makefile.dpct. | 
| --change-cuda-files-extension-only | Limit extension change to .cu and .cuh files only. Default: off. | 
| --check-unicode-security | Enable detection and warnings about Unicode constructs that can be exploited by using bi-directional formatting codes and homoglyphs in identifiers. Default: off. | 
| --comments | Insert comments explaining the generated code. Default: off. | 
| --compilation-database=<dir> | The directory path for the compilation database (compile_commands.json) for the files to be migrated. Paths and build options described in the project file are used to guide the migration. When no path is specified, a search for compile_commands.json is attempted through all parent directories of the first input source file. Same as -p. | 
| --cuda-include-path=<dir> | The directory path of the CUDA* header files. | 
| --enable-codepin | EXPERIMENTAL: Generate instrumented CUDA and SYCL code for debug and verification purposes. | 
| --enable-ctad | Use a C++17 class template argument deduction (CTAD) in your generated code. | 
| --enable-profiling | Enable SYCL* queue profiling in helper functions. Default: off. | 
| --extra-arg=<string> | Specify additional arguments to append to the migration command line. The option accepts a comma-separated list of extra arguments and may be used multiple times in a command. For example: Use the dpct -- -help command to find options that can be passed as extra arguments for the migration command. | 
| --format-range=<value> | Sets the range of formatting. The values are: 
 | 
| --format-style=<value> | Sets the formatting style. The values are: 
 Example for the .clang-format file content:  | 
| --gen-build-script | Generates makefile for migrated file(s) in -out-root directory. Default: off. | 
| --gen-helper-function | Generates helper function files in the --out-root directory. Default: off. | 
| --help | Provides a list of dpct specific options. | 
| --helper-function-dir | Print the installation directory for helper function header files. | 
| --helper-function-preference=<value> | The preference of helper function usage in migration. Value: 
 | 
| --intercept-build | Intercept build tool to generate a compilation database. | 
| --in-root=<dir> | The directory path for the root of the source tree that needs to be migrated. Only files under this root are migrated. Default: 
 Details: 
 | 
| --in-root-exclude=<dir|file> | Excludes the specified directory or file from processing. | 
| --keep-original-code | Keeps the original code in the comments of generated SYCL files. Default: off. | 
| --migrate-build-script=<value> | EXPERIMENTAL: Migrate build script(s). 
 | 
| --migrate-build-script-only | EXPERIMENTAL: Only migrate the build script(s). Default: off. | 
| --no-dpcpp-extensions=<value> | A comma-separated list of extensions not to be used in migrated code. By default, these extensions are used in migrated code. The values are: 
 | 
| --no-dry-pattern | Do not use a Don’t Repeat Yourself (DRY) pattern when functions from the dpct namespace are inserted. Default: off. | 
| --no-incremental-migration | Tells the tool to not perform an incremental migration. Default: off (incremental migration happens). | 
| --optimize-migration | Generates SYCL code applying more aggressive assumptions that potentially may alter the semantics of your program. Default: off. | 
| --out-root=<dir> | The directory path for root of generated files. A directory is created if it does not exist. Default: dpct_output. The relative paths for the generated files are maintained. By default, file extensions are changed as follows: 
 To limit file extension changes to .cu and .cuh files only, use the --change-cuda-files-extension-only option. | 
| --output-file=<file> | Redirects the stdout/stderr output to <file> in the output directory specified by the --out-root option. | 
| --output-verbosity=<value> | Sets the output verbosity level: 
 | 
| -p | Alias for --compilation-database. | 
| --process-all | Migrates or copies all files, except hidden, from the --in-root directory to the --out-root directory. The --in-root option should be explicitly specified. Default: off. Details: If --process-all and --in-root options are specified, but no input files are provided, the tool migrates or copies all files, except hidden, from the --in-root directory to the output directory. 
 --process-all is ignored if input files are provided on the command line. | 
| -query-api-mapping=<api> | Query functionally-compatible SYCL API to migrate CUDA API. | 
| --report-file-prefix=<prefix> | Specify the prefix for the migration report file names. The full file name will have a suffix derived from the report-type, and an extension derived from the report-format. For example: <prefix>.apis.csv or <prefix>.stats.log. If this option is not specified, the report goes to stdout. The report files are created in the directory, specified by -out-root. | 
| --report-format=<value> | Specify the format of the reports: 
 | 
| --report-only | Generate migration reports only. No SYCL code will be generated. Default: off. | 
| --report-type=<value> | Specifies the type of migration report. Values are: 
 | 
| --rule-file=<file> | Specifies the rule file path that contains rules used for migration. | 
| --stop-on-parse-err | Stop migration and generation of reports if parsing errors happened. Default: off. | 
| --suppress-warnings=<value> | A comma-separated list of migration warnings to suppress. Valid warning IDs range from 1000 to 1121. Hyphen-separated ranges are also allowed. For example: -suppress-warnings=1000-1010,1011. | 
| --suppress-warnings-all | Suppresses all migration warnings. Default: off. | 
| --sycl-file-extension=<value> | Specifies the extension of migrated source file(s). The values are: 
 | 
| --sycl-named-lambda | Generates kernels with the kernel name. Default: off. | 
| --use-dpcpp-extensions=<value> | A comma-separated list of extensions to be used in migrated code. By default, these extensions are not used in migrated code. 
 | 
| --use-experimental-features=<value> | A comma-separated list of experimental features to be used in migrated code. By default, experimental features will not be used in migrated code. The values are: 
 | 
| --use-explicit-namespace=<value> | Defines the namespaces to use explicitly in generated code. The value is a comma-separated list. Default: dpct, sycl. Possible values are: 
 | 
| --usm-level=<value> | Sets the Unified Shared Memory (USM) level to use in source code generation: 
 | 
| --vcxprojfile=<file> | The directory path for the C++ project file vcxproj of the Visual Studio project to migrate. Paths and build options described in the project file are used to guide the migration. | 
| --version | Shows the version of the tool. |