[all-commits] [llvm/llvm-project] 561dcb: [Clang] Permit `-Xarch_` to be used with `--offloa...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Fri Mar 21 06:26:15 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 561dcb26d4597b592caa417d36c1a4e09fb2be2d
https://github.com/llvm/llvm-project/commit/561dcb26d4597b592caa417d36c1a4e09fb2be2d
Author: Joseph Huber <huberjn at outlook.com>
Date: 2025-03-21 (Fri, 21 Mar 2025)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/test/Driver/offload-Xarch.c
Log Message:
-----------
[Clang] Permit `-Xarch_` to be used with `--offload-arch` (#131884)
Summary:
The `--offload-arch` option is very complicated, but roughly behaves as
the `-march` option for several compilations at once. This creates
problems when we try to combine multiple separate architectures into
one, as happens with SYCL, OpenMP, and HIP w/ SPIR-V.
The existing solution used by OpenMP is the `-Xopenmp-target` option,
this lets you select which `--offload-arch` options go to which
toolchain. This patch permits `-Xarch_` to be used in the same way.
There are concerns about whether or not this falls into the `-Xarch_`
umbrella because it changes the driver behaviour, but I think this is
the
easiest way to handle this problem. The existing solution seems to be
prefixing things and adding more magic handling into `--offload-arch`.
Like SYCL is doing `nvidia_gpu_sm_89` instead of just `-Xarch_nvptx64
--offload-arch=sm_89`.
The only reason this is more complicated than just doing `-Xarch_sm_89
-march=...` is because we need to know to create multiple jobs for each
architecture.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list