Skip to content

Commit

Permalink
[SYCLomatic][Doc] Add doc description for analysis mode (#1712)
Browse files Browse the repository at this point in the history
Signed-off-by: Ziran Zhang <[email protected]>
  • Loading branch information
ziranzha authored Mar 5, 2024
1 parent 7f9e85a commit 498230e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions docs/dev_guide/migration/analysis-mode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Analysis Mode Guide
=======================

Analysis Mode generates a summary report showing how many lines of code are migrated with confidence, and how many lines of code are migrated imperfectly due to the language gap between CUDA and SYCL. The report also provides an estimation of how much human effort will be required to complete the code migration. Three "effort levels" have been defined: low effort, medium effort, and high effort. All migration issues are classified into these levels. Typically, a low effort level indicates issues that the developer can solve in minutes, whereas a medium effort level indicates an issue that may take hours to solve. If a high effort level issue is reports, this unfortunately means that there is not yet an equivalent functionality provided in SYCL or SYCL ecosystem libraries for the CUDA API or the CUDA library API. In these cases, the developer will need to manually rewrite the functionality.

An example analysis report can be seen as follows:

.. code-block:: none
reduction.cpp:
+ 26 lines of code (100%) will be automatically migrated.
- 22 APIs/Types - No manual effort.
- 4 APIs/Types - Low manual effort for checking and code fixing.
- 0 APIs/Types - Medium manual effort for code fixing.
+ 0 lines of code ( 0%) will not be automatically migrated.
- 0 APIs/Types - High manual effort for code fixing.
reduction_kernel.cu:
+ 77 lines of code ( 89%) will be automatically migrated.
- 7 APIs/Types - No manual effort.
- 63 APIs/Types - Low manual effort for checking and code fixing.
- 7 APIs/Types - Medium manual effort for code fixing.
+ 9 lines of code ( 10%) will not be automatically migrated.
- 9 APIs/Types - High manual effort for code fixing.
Total Project:
+103 lines of code ( 91%) will be automatically migrated.
- 29 APIs/Types - No manual effort.
- 67 APIs/Types - Low manual effort for checking and code fixing.
- 7 APIs/Types - Medium manual effort for code fixing.
+ 9 lines of code ( 8%) will not be automatically migrated.
- 9 APIs/Types - High manual effort for code fixing.
|tool_name| provides a command line option to enable this feature:

.. code-block:: bash
$ dpct --analysis-mode sample.cu
|tool_name| supports saving the report to a file:

.. code-block:: bash
$ dpct --analysis-mode --analysis-report-output-file=report.txt sample.cu

0 comments on commit 498230e

Please sign in to comment.