Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCLomatic] Update README and option desc #2674

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions clang/include/clang/DPCT/DPCTOptions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ DPCT_OPTION(clang::dpct::list, std::string, RuleFile,
"rule-file",
llvm::cl::desc(
"Specify the rule file "
"for migration. Also, reference to the predefined rules in"
" \"extensions\" directory in the root folder of the tool.\n"),
"for migration. Also, reference the predefined rules in"
" the \"extensions\" directory in the root folder of the tool.\n"),
llvm::cl::value_desc("file"), llvm::cl::cat(CtHelpCatAdvanced),
llvm::cl::ZeroOrMore)

Expand Down Expand Up @@ -805,21 +805,21 @@ DPCT_ENUM_OPTION(
false),
DPCT_OPTION_ENUM_VALUE(
"virtual_mem", int(ExperimentalFeatures::Exp_VirtualMemory),
"Experimental extension that allows map an address range onto "
"Experimental extension that allows for mapping of an address range onto "
"multiple allocations of physical memory.",
false),
DPCT_OPTION_ENUM_VALUE(
"in_order_queue_events",
int(ExperimentalFeatures::Exp_InOrderQueueEvents),
"Experimental extension that allows get the event from the "
"last command submission into the queue and set an external "
"Experimental extension that allows placing the event from the "
"last command submission into the queue and setting an external "
"event as an implicit dependence on the next command submitted to "
"the queue.",
false),
DPCT_OPTION_ENUM_VALUE(
"non-stdandard-sycl-builtins",
int(ExperimentalFeatures::Exp_NonStandardSYCLBuiltins),
"Experimental extension that allows to use non standard SYCL "
"Experimental extension that allows use of non standard SYCL "
"builtin functions.\n",
false),
DPCT_OPTION_ENUM_VALUE(
Expand Down
8 changes: 4 additions & 4 deletions clang/test/dpct/help_option_check/lin/help_advanced.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Advanced DPCT options
=assert - Disable the assert extension.
=queue_empty - Disable the queue empty extension.
=all - Disable all extensions listed in this option.
--rule-file=<file> - Specify the rule file for migration. Also, reference to the predefined rules in "extensions" directory in the root folder of the tool.
--rule-file=<file> - Specify the rule file for migration. Also, reference the predefined rules in the "extensions" directory in the root folder of the tool.
--use-dpcpp-extensions=<value> - A comma-separated list of extensions to be used in migrated code.
By default, these extensions are not used in migrated code.
=c_cxx_standard_library - Use std functions from the libdevice library (provided by Intel(R) oneAPI DPC++/C++ Compiler)
Expand Down Expand Up @@ -59,9 +59,9 @@ Advanced DPCT options
=non-uniform-groups - Experimental extension that allows use of non-uniform groups.
=device_global - Experimental extension that allows device scoped memory allocations into SYCL that can
be accessed within a kernel using syntax similar to C++ global variables.
=virtual_mem - Experimental extension that allows map an address range onto multiple allocations of physical memory.
=in_order_queue_events - Experimental extension that allows get the event from the last command submission into the queue and set an external event as an implicit dependence on the next command submitted to the queue.
=non-stdandard-sycl-builtins - Experimental extension that allows to use non standard SYCL builtin functions.
=virtual_mem - Experimental extension that allows for mapping of an address range onto multiple allocations of physical memory.
=in_order_queue_events - Experimental extension that allows placing the event from the last command submission into the queue and setting an external event as an implicit dependence on the next command submitted to the queue.
=non-stdandard-sycl-builtins - Experimental extension that allows use of non standard SYCL builtin functions.
=prefetch - Experimental extension that allows use of SYCL prefetch APIs.
=all - Enable all experimental extensions listed in this option.

Expand Down
8 changes: 4 additions & 4 deletions clang/test/dpct/help_option_check/lin/help_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ All DPCT options
SYCL, LOC migrated to SYCL with helper functions, LOC not needing migration,
LOC needing migration but are not migrated. The report file name has the .stats
suffix added (default)
--rule-file=<file> - Specify the rule file for migration. Also, reference to the predefined rules in "extensions" directory in the root folder of the tool.
--rule-file=<file> - Specify the rule file for migration. Also, reference the predefined rules in the "extensions" directory in the root folder of the tool.
--stop-on-parse-err - Stop migration and generation of reports if parsing errors happened. Default: off.
--suppress-warnings=<value> - A comma separated list of migration warnings to suppress. Valid warning IDs range
from 1000 to 1136. Hyphen separated ranges are also allowed. For example:
Expand Down Expand Up @@ -166,9 +166,9 @@ All DPCT options
=non-uniform-groups - Experimental extension that allows use of non-uniform groups.
=device_global - Experimental extension that allows device scoped memory allocations into SYCL that can
be accessed within a kernel using syntax similar to C++ global variables.
=virtual_mem - Experimental extension that allows map an address range onto multiple allocations of physical memory.
=in_order_queue_events - Experimental extension that allows get the event from the last command submission into the queue and set an external event as an implicit dependence on the next command submitted to the queue.
=non-stdandard-sycl-builtins - Experimental extension that allows to use non standard SYCL builtin functions.
=virtual_mem - Experimental extension that allows for mapping of an address range onto multiple allocations of physical memory.
=in_order_queue_events - Experimental extension that allows placing the event from the last command submission into the queue and setting an external event as an implicit dependence on the next command submitted to the queue.
=non-stdandard-sycl-builtins - Experimental extension that allows use of non standard SYCL builtin functions.
=prefetch - Experimental extension that allows use of SYCL prefetch APIs.
=all - Enable all experimental extensions listed in this option.
--use-explicit-namespace=<value> - Define the namespaces to use explicitly in generated code. The <value> is a comma
Expand Down
8 changes: 4 additions & 4 deletions clang/test/dpct/help_option_check/win/help_advanced.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Advanced DPCT options
=assert - Disable the assert extension.
=queue_empty - Disable the queue empty extension.
=all - Disable all extensions listed in this option.
--rule-file=<file> - Specify the rule file for migration. Also, reference to the predefined rules in "extensions" directory in the root folder of the tool.
--rule-file=<file> - Specify the rule file for migration. Also, reference the predefined rules in the "extensions" directory in the root folder of the tool.
--use-dpcpp-extensions=<value> - A comma-separated list of extensions to be used in migrated code.
By default, these extensions are not used in migrated code.
=c_cxx_standard_library - Use std functions from the libdevice library (provided by Intel(R) oneAPI DPC++/C++ Compiler)
Expand Down Expand Up @@ -59,9 +59,9 @@ Advanced DPCT options
=non-uniform-groups - Experimental extension that allows use of non-uniform groups.
=device_global - Experimental extension that allows device scoped memory allocations into SYCL that can
be accessed within a kernel using syntax similar to C++ global variables.
=virtual_mem - Experimental extension that allows map an address range onto multiple allocations of physical memory.
=in_order_queue_events - Experimental extension that allows get the event from the last command submission into the queue and set an external event as an implicit dependence on the next command submitted to the queue.
=non-stdandard-sycl-builtins - Experimental extension that allows to use non standard SYCL builtin functions.
=virtual_mem - Experimental extension that allows for mapping of an address range onto multiple allocations of physical memory.
=in_order_queue_events - Experimental extension that allows placing the event from the last command submission into the queue and setting an external event as an implicit dependence on the next command submitted to the queue.
=non-stdandard-sycl-builtins - Experimental extension that allows use of non standard SYCL builtin functions.
=prefetch - Experimental extension that allows use of SYCL prefetch APIs.
=all - Enable all experimental extensions listed in this option.

Expand Down
8 changes: 4 additions & 4 deletions clang/test/dpct/help_option_check/win/help_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ All DPCT options
SYCL, LOC migrated to SYCL with helper functions, LOC not needing migration,
LOC needing migration but are not migrated. The report file name has the .stats
suffix added (default)
--rule-file=<file> - Specify the rule file for migration. Also, reference to the predefined rules in "extensions" directory in the root folder of the tool.
--rule-file=<file> - Specify the rule file for migration. Also, reference the predefined rules in the "extensions" directory in the root folder of the tool.
--stop-on-parse-err - Stop migration and generation of reports if parsing errors happened. Default: off.
--suppress-warnings=<value> - A comma separated list of migration warnings to suppress. Valid warning IDs range
from 1000 to 1136. Hyphen separated ranges are also allowed. For example:
Expand Down Expand Up @@ -165,9 +165,9 @@ All DPCT options
=non-uniform-groups - Experimental extension that allows use of non-uniform groups.
=device_global - Experimental extension that allows device scoped memory allocations into SYCL that can
be accessed within a kernel using syntax similar to C++ global variables.
=virtual_mem - Experimental extension that allows map an address range onto multiple allocations of physical memory.
=in_order_queue_events - Experimental extension that allows get the event from the last command submission into the queue and set an external event as an implicit dependence on the next command submitted to the queue.
=non-stdandard-sycl-builtins - Experimental extension that allows to use non standard SYCL builtin functions.
=virtual_mem - Experimental extension that allows for mapping of an address range onto multiple allocations of physical memory.
=in_order_queue_events - Experimental extension that allows placing the event from the last command submission into the queue and setting an external event as an implicit dependence on the next command submitted to the queue.
=non-stdandard-sycl-builtins - Experimental extension that allows use of non standard SYCL builtin functions.
=prefetch - Experimental extension that allows use of SYCL prefetch APIs.
=all - Enable all experimental extensions listed in this option.
--use-explicit-namespace=<value> - Define the namespaces to use explicitly in generated code. The <value> is a comma
Expand Down
14 changes: 7 additions & 7 deletions clang/tools/dpct/extensions/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Pre-defined rules
This folder provides predefined user-defined migration rules in YAML files, targeted to extend the tool's migration capability. The `rule_templates` folder provides example rules to implement a user migration rule in YAML user can refer to, while other rule folders provide migration rules that can be loaded and applied directly by the tool's option `--rule-files`.
This folder provides predefined user-defined migration rules in YAML files, designed to extend the tool's migration capability. The `rule_templates` folder provides example rules to implement a user migration rule in YAML that the user can refer to, while other rule folders provide migration rules that can be loaded and applied directly using the tool's option `--rule-files`.

## cmake_rules
This folder provides migration rules for CMake script.
This folder provides migration rules for CMake scripts.

`cmake_script_migration_rule.yaml`: Provides the general migration rules for CMake script migration. This file is loaded by default if the tool is guided to migrate the CMake script (option `--migrate-build-script=CMake` is provided by the user).
`cmake_script_migration_rule.yaml`: Provides the general migration rules for CMake script migration. This file is loaded by default if the user directs the tool to migrate the CMake script by providing the following: option `--migrate-build-script=CMake`.

`cmake_script_migration_rule_optional.yaml`: Provides extra migration rules for CMake script migration. It is not loaded by default, but please apply it if necessary.

Expand All @@ -18,11 +18,11 @@ This folder provides optional migration rules. The migration rules are not load
`macro_checks.yaml`: Provides a specific migration rule to migrate the error-checking macro `CUDA_CHECK` to `DPCT_CHECK_ERROR.`

## python_rules
This folder provides migration rules for Python script. The migration rules are not loaded by default, but please apply them if necessary.
This folder provides migration rules for Python scripts. The migration rules are not loaded by default, but please apply them if necessary.

`python_build_script_migration_rule_ipex.yaml`: provides migration rules to migrate python build script for Pytorch-based projects to work with Intel(R) Extension for PyTorch (IPEX).
`python_build_script_migration_rule_ipex.yaml`: Provides migration rules to migrate python build script for Pytorch-based projects to work with Intel(R) Extension for PyTorch (IPEX).

`python_build_script_migration_rule_pytorch.yaml`: provides migration rules to migrate Python build script for Pytorch-based projects to work with official PyTorch release with XPU support.
`python_build_script_migration_rule_pytorch.yaml`: Provides migration rules to migrate Python build scripts for Pytorch-based projects to work with official PyTorch release with XPU support.

## pytorch_api_rule_rules
`pytorch_api.yaml`: provides migration rules to migrate Pytorch CUDA backend-specific API of Pytorch-based projects to Pytorch backend agnostic API or XPU backend-specific API.
`pytorch_api.yaml`: Provides migration rules to migrate Pytorch CUDA backend-specific API of Pytorch-based projects to Pytorch backend agnostic API or XPU backend-specific API.
Loading