[PATCH] D128090: [Clang][OpenMP] Process multi-arch compilation options given via -march

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 13 07:32:37 PDT 2022


jhuber6 added a comment.

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=`.


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