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 #2609][UX] Improved behavior test for --help option #2625

Open
wants to merge 2 commits into
base: SYCLomatic
Choose a base branch
from
Open
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
71 changes: 71 additions & 0 deletions clang/test/dpct/help_option_check/help_advanced.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
USAGE: dpct [options] [<source0> ... <sourceN>]

OPTIONS: Advanced
Advanced DPCT options

--format-range=<value> - Set the range of formatting.
The values are:
=all - Format all code.
=migrated - Only format the migrated code (default).
=none - Do not format any code.
--format-style=<value> - Set the formatting style.
The values are:
=custom - Use the coding style defined in the .clang-format file (default).
=llvm - Use the LLVM coding style.
=google - Use the Google coding style.
--migrate-build-script=<value> - EXPERIMENTAL: A comma-separated list of build script type(s) to be migrated.
By default, no build script is migrated.
The values are:
=CMake - Migrate the CMake file(s).
=Python - Migrate the python build script file(s) of PyTorch based project.
--no-dpcpp-extensions=<value> - A comma-separated list of extensions not to be used in migrated code.
By default, these extensions are used in migrated code.
The values are:
=bfloat16 - Disable the SYCL extensions for bfloat16.
=device_info - Disable the Intel extensions for device information, if supported by the compiler and the backend.
=enqueued_barriers - Disable the enqueued barriers extension.
=peer_access - Disable the peer access extension.
=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 path that contains rules used for migration.
--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)
and C/C++ Standard Library to migrate functions which have no mapping in the SYCL standard.
If this value is used together with intel_device_math, the intel_device_math functions take
precedence.
=intel_device_math - Use sycl::ext::intel::math functions from the libdevice library (provided by Intel(R) oneAPI
DPC++/C++ Compiler) to migrate functions which have no mapping in the SYCL standard.
=all - Enable all DPC++ extensions listed in this option.
--use-experimental-features=<value> - A comma-separated list of experimental features to be used in migrated code.
By default, experimental features will not be used in migrated code.
The values are:
=free-function-queries - Experimental extension that allows getting 'id', 'item', 'nd_item', 'group', and
'sub_group' instances globally.
=local-memory-kernel-scope-allocation - Experimental extension that allows allocation of local memory objects at the kernel
functor scope
=logical-group - Experimental helper function used to logically group work-items.
=root-group - Experimental extension that allows use of root group class and relative API.
=nd_range_barrier - DEPRECATED : Experimental helper function used to help cross-group synchronization during migration. Please use the following option instead: --use-experimental-features=root-group.
=user-defined-reductions - Experimental extension that allows user-defined reductions.
=masked-sub-group-operation - Experimental helper function used to execute sub-group operation with mask.
=dpl-experimental-api - Experimental extension that allows use of experimental oneDPL APIs.
=occupancy-calculation - Experimental helper function used to calculate occupancy.
=matrix - Experimental extension that allows use of matrix extension like class joint_matrix.
=bfloat16_math_functions - Experimental extension that allows use of bfloat16 math functions.
=bindless_images - Experimental extension that allows use of bindless images APIs.
=graph - Experimental extension that allows use of SYCL Graph APIs.
=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.
=prefetch - Experimental extension that allows use of SYCL prefetch APIs.
=all - Enable all experimental extensions listed in this option.

<source0> ... Paths of input source files. These paths are looked up in the compilation database.

See Diagnostics Reference to resolve warnings and complete the migration:
https://oneapi-src.github.io/SYCLomatic/dev_guide/reference/diagnostics-reference.html
71 changes: 71 additions & 0 deletions clang/test/dpct/help_option_check/help_advanced_win.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
USAGE: dpct.exe [options] [<source0> ... <sourceN>]

OPTIONS: Advanced
Advanced DPCT options

--format-range=<value> - Set the range of formatting.
The values are:
=all - Format all code.
=migrated - Only format the migrated code (default).
=none - Do not format any code.
--format-style=<value> - Set the formatting style.
The values are:
=custom - Use the coding style defined in the .clang-format file (default).
=llvm - Use the LLVM coding style.
=google - Use the Google coding style.
--migrate-build-script=<value> - EXPERIMENTAL: A comma-separated list of build script type(s) to be migrated.
By default, no build script is migrated.
The values are:
=CMake - Migrate the CMake file(s).
=Python - Migrate the python build script file(s) of PyTorch based project.
--no-dpcpp-extensions=<value> - A comma-separated list of extensions not to be used in migrated code.
By default, these extensions are used in migrated code.
The values are:
=bfloat16 - Disable the SYCL extensions for bfloat16.
=device_info - Disable the Intel extensions for device information, if supported by the compiler and the backend.
=enqueued_barriers - Disable the enqueued barriers extension.
=peer_access - Disable the peer access extension.
=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 path that contains rules used for migration.
--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)
and C/C++ Standard Library to migrate functions which have no mapping in the SYCL standard.
If this value is used together with intel_device_math, the intel_device_math functions take
precedence.
=intel_device_math - Use sycl::ext::intel::math functions from the libdevice library (provided by Intel(R) oneAPI
DPC++/C++ Compiler) to migrate functions which have no mapping in the SYCL standard.
=all - Enable all DPC++ extensions listed in this option.
--use-experimental-features=<value> - A comma-separated list of experimental features to be used in migrated code.
By default, experimental features will not be used in migrated code.
The values are:
=free-function-queries - Experimental extension that allows getting 'id', 'item', 'nd_item', 'group', and
'sub_group' instances globally.
=local-memory-kernel-scope-allocation - Experimental extension that allows allocation of local memory objects at the kernel
functor scope
=logical-group - Experimental helper function used to logically group work-items.
=root-group - Experimental extension that allows use of root group class and relative API.
=nd_range_barrier - DEPRECATED : Experimental helper function used to help cross-group synchronization during migration. Please use the following option instead: --use-experimental-features=root-group.
=user-defined-reductions - Experimental extension that allows user-defined reductions.
=masked-sub-group-operation - Experimental helper function used to execute sub-group operation with mask.
=dpl-experimental-api - Experimental extension that allows use of experimental oneDPL APIs.
=occupancy-calculation - Experimental helper function used to calculate occupancy.
=matrix - Experimental extension that allows use of matrix extension like class joint_matrix.
=bfloat16_math_functions - Experimental extension that allows use of bfloat16 math functions.
=bindless_images - Experimental extension that allows use of bindless images APIs.
=graph - Experimental extension that allows use of SYCL Graph APIs.
=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.
=prefetch - Experimental extension that allows use of SYCL prefetch APIs.
=all - Enable all experimental extensions listed in this option.

<source0> ... Paths of input source files. These paths are looked up in the compilation database.

See Diagnostics Reference to resolve warnings and complete the migration:
https://oneapi-src.github.io/SYCLomatic/dev_guide/reference/diagnostics-reference.html
Loading