A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://oneapi-src.github.io/SYCLomatic/dev_guide/migration/incremental-migration.html below:

Incremental Migration — SYCLomatic Documentation

Incremental Migration#

SYCLomatic provides incremental migration, which automatically merges the results from multiple migrations into a single migrated project.

Incremental migration can be used to

Incremental migration is enabled by default. Disable incremental migration using the --no-incremental-migration option.

Example 1: Migrate a File with Conditional Compilation Code#

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.

  1. 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
    
  2. 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”
    
  3. 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:

  1. SYCLomatic option --no-incremental-migration is specified.

  2. Different versions of SYCLomatic are used across multiple migration invocations.

  3. 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.


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