[PATCH] D128090: [Clang][OpenMP] Process multi-arch compilation options given via -march
Saiyedul Islam via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 10:25:05 PDT 2022
saiislam added a comment.
In D128090#3648210 <https://reviews.llvm.org/D128090#3648210>, @jhuber6 wrote:
> Sorry never noticed this revision. The purpose of this patch seems to be supporting something like this
>
> clang input.c -fopenmp -fopenmp-targets=nvptx64 -Xopenmp-target=nvptx64 -march=sm_70 -Xopenmp-target=nvptx64 -march=sm_80
>
> Right now the above works if you replace `-march=` with `--offload-arch=`. Currently the offloading tools use a "bound" architecture to tie a specific architecture with a job, which is what allows us to offload to multiple architectures. If there is no bound architecture gives, we instead use the `-march=` option, and if that is not present we derive it. It would be possible to set the bound architecture via `-march` if we wanted to. But I'm not sure if it's necessary given that it would just be an alternate syntax for `--offload-arch=`.
`-Xopenmp-target -march ` used to be the only option to target a specific sub arch before `--offload-arch`. But, it doesn't support multiple archs.
This patch relies on infra used by `--offload-arch` to support this verbose method of specifying multiple archs.
Use case: people already familiar with `-Xopenmp-target -march` option are likely to use the same for multiple archs, until they learn about shorthand representation, `--offload-arch`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128090/new/
https://reviews.llvm.org/D128090
More information about the cfe-commits
mailing list