-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCLomatic][Doc] Add doc description for analysis mode (#1712)
Signed-off-by: Ziran Zhang <[email protected]>
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |