Skip to content

Conversation

@jinge90
Copy link
Contributor

@jinge90 jinge90 commented Oct 29, 2025

Current implementation for -Xarch_device/host can work in any offloading model besides CUDA/HIP, so remove the specific offloading model in help text to align with implementation.

@jinge90 jinge90 requested a review from bader October 29, 2025 03:03
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Oct 29, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 29, 2025

@llvm/pr-subscribers-clang

Author: None (jinge90)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/165503.diff

1 Files Affected:

  • (modified) clang/include/clang/Driver/Options.td (+2-2)
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 8784c9d7d206d..77a5ed67beb29 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -950,9 +950,9 @@ def Xarch__
   the host system, which can be used to suppress incompatible GPU arguments.}]>,
       MetaVarName<"<arch> <arg>">;
 def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>,
-  HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">;
+  HelpText<"Pass <arg> to the CUDA/HIP/SYCL host compilation">, MetaVarName<"<arg>">;
 def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>,
-  HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">;
+  HelpText<"Pass <arg> to the CUDA/HIP/SYCL device compilation">, MetaVarName<"<arg>">;
 def Xassembler : Separate<["-"], "Xassembler">,
   HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">,
   Group<CompileOnly_Group>;

@jinge90
Copy link
Contributor Author

jinge90 commented Oct 29, 2025

Hi, @bader
-Xarch_device/host can work for SYCL and we have used them in intel/llvm, this PR shows SYCL is supported in -Xarch_device/host help text.
Thanks very much.

Signed-off-by: jinge90 <ge.jin@intel.com>
@bader
Copy link
Contributor

bader commented Oct 29, 2025

we have used them in intel/llvm

Do they do anything useful for SYCL in https://github.com/llvm/llvm-project/?

@jinge90
Copy link
Contributor Author

jinge90 commented Oct 29, 2025

we have used them in intel/llvm

Do they do anything useful for SYCL in https://github.com/llvm/llvm-project/?

Hi, @bader
The driver code handling -Xarch_device/host doesn't do specific things to SYCL or CUDA, HIP : https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/Compilation.cpp#L58
If you think we can update the help text, I will add a lit test for -Xarch in SYCL.
Thank very much.

@bader
Copy link
Contributor

bader commented Oct 30, 2025

The driver code handling -Xarch_device/host doesn't do specific things to SYCL or CUDA, HIP : https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/Compilation.cpp#L58

I see that @jhuber6 enabled these options for OpenMP offload in eec516a. The patch enabled them not only for OpenMP offload, but for any offloading programming model.

Considering that, I suggest we don't specify offloading models at all. Let's align the help text with the implementation by removing mentions of CUDA/HIP/SYCL.

@jinge90 jinge90 changed the title [Driver][NFC] Show SYCL support in -Xarch_device/host help text [Driver][NFC] Don't specify offloading model in help text for -Xarch_device/host Oct 31, 2025
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
@shiltian, @jhuber6, FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants