Skip to content

Commit

Permalink
[SYCLomatic] Add macro document in the dpct.hpp (#2631)
Browse files Browse the repository at this point in the history
Signed-off-by: Jiang, Zhiwei <zhiwei.jiang@intel.com>
Co-authored-by: Wang, Zhiming <zhiming.wang@intel.com>
  • Loading branch information
zhiweij1 and zhimingwang36 authored Jan 21, 2025
1 parent 5d3b1e2 commit a1a8876
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions clang/runtime/dpct-rt/include/dpct/dpct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,37 @@
//
//===----------------------------------------------------------------------===//

// clang-format off
/*
There are 3 macros that can be used to control the behavior of the helper
function files.
+========================+=========================+===========================+
| | Helper function files | Helper function files |
| Macro Name | Used in dpct migrated | Used in direct |
| | code | programming |
+========================+=========================+===========================+
| DPCT_USM_LEVEL_NONE | USM by default. | USM by default. |
| (Use USM or SYCL | Use SYCL Buffer by | Define it explicitly to |
| buffer) | running dpct with | use the SYCL buffer. |
| | "--use-level=none". | |
+------------------------+-------------------------+---------------------------+
| DPCT_PROFILING_ENABLED | Enabled heuristically | Disable by default. |
| (Enable SYCL queue | depends on the input | Define it explicitly to |
| profiling) | code. | enable. |
| | Enable explicitly by | |
| | running dpct with | |
| | "--enable-profiling". | |
| | Disable by removing the | |
| | macro definition | |
| | manually. | |
+------------------------+-------------------------+---------------------------+
| DPCT_HELPER_VERBOSE | Disable by default. | Disable by default. |
| (Verbose option) | Define it explicitly to | Define it explicitly to |
| | enable. | enable. |
+========================+=========================+===========================+
*/
// clang-format on

#ifndef __DPCT_HPP__
#define __DPCT_HPP__

Expand Down

0 comments on commit a1a8876

Please sign in to comment.