SYCLomatic provides incremental migration, which automatically merges the results from multiple migrations into a single migrated project.
Incremental migration can be used to
migrate a CUDA* project incrementally, for example 10 files at a time
migrate new CUDA files into an already migrated project
migrate multiple code paths
Incremental migration is enabled by default. Disable incremental migration using the --no-incremental-migration
option.
This example shows incremental migration for a file sample1.cu
that contains conditional compilation code. Content of sample1.cu
:
1 #ifndef MACRO_A 2 ... code path 1 ... 3 #elif MACRO_A == 1 4 ... code path 2 ... 5 #else 6 ... code path 3 ... 7 #endif
Use the following steps to incrementally migrate sample1.cu
.
Generate sample1.dp.cpp
, which contains migrated code for code path 1. From the same working directory as the file, run:
dpct sample1.cu --out-root=out
Generate sample1.dp.cpp
, which contains migrated code for code path 1 and code path 2:
dpct sample1.cu --out-root=out --extra-arg=”-DMACRO_A=1”
Generate sample1.dp.cpp
, which contains migrated code for code path 1, code path 2, and code path 3:
dpct sample1.cu --out-root=out --extra-arg=”-DMACRO_A=2”
The result contains migrated code for each code path.
Limitations#Incremental migration will not be triggered in the following conditions:
SYCLomatic option --no-incremental-migration
is specified.
Different versions of SYCLomatic are used across multiple migration invocations.
Different options of SYCLomatic are used across multiple migration invocations. If SYCLomatic detects that a previous migration used a different option-set, SYCLomatic will stop migration and exit.
The following options direct SYCLomatic to generate different migrated code and may break incremental migration. Use the same values for these options across migration invocations to keep incremental migration working.
--always-use-async-handler
--assume-nd-range-dim
--comments
--custom-helper-name
--enable-ctad
--keep-original-code
--no-cl-namespace-inline
--no-dpcpp-extensions
--no-dry-pattern
--optimize-migration
-p
--process-all
--sycl-named-lambda
--use-experimental-features
--use-explicit-namespace
--usm-level
--vcxprojfile
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4