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

2022-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D128090#3649579 , @tra wrote: > In D128090#3649235 , @jhuber6 wrote: > >> Interesting, may be worthwhile to query that if it exists, though AMD does >> this with `amdgpu-arch` which

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

2022-07-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D128090#3649235 , @jhuber6 wrote: > Interesting, may be worthwhile to query that if it exists, though AMD does > this with `amdgpu-arch` which has led to problems for me in the past. But > even if it could be wrong it will still

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

2022-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D128090#3649202 , @tra wrote: > In D128090#3649125 , @jhuber6 wrote: > >> It just defaults to `sm_35` if CUDA isn't present on the system IIRC. >> Alternatively we could ship a tool

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

2022-07-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D128090#3649125 , @jhuber6 wrote: > It just defaults to `sm_35` if CUDA isn't present on the system IIRC. > Alternatively we could ship a tool to derive it at compile time. As it happens, recent CUDA releases ship with

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

2022-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D128090#3649059 , @tra wrote: > In D128090#3648999 , @jhuber6 wrote: > >> Right now there's `CLANG_OPENMP_NVPTX_DEFAULT_ARCH`, which is defined by >> CMake to be the architecture of

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

2022-07-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D128090#3648999 , @jhuber6 wrote: > Right now there's `CLANG_OPENMP_NVPTX_DEFAULT_ARCH`, which is defined by > CMake to be the architecture of the system used to build clang That does not make sense to me. Most of the time clang

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

2022-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D128090#3648984 , @tra wrote: > At some point we should start consolidating the ways we can specify an > offload target and try to avoid adding new ones until then. Agreed, that was my intention with making `--offload-arch`

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

2022-07-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > Overloading the meaning of `-march` might not work here. Typically `-march` > is just checked via `Args.getLastArg()`, so repeated uses just override the > last one. I'm not exactly sure what the expected use is however, maybe @tra > can help there. Although we could

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

2022-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a subscriber: tra. jhuber6 added a comment. In D128090#3648879 , @saiislam wrote: > `-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. >

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

2022-07-13 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. In 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 >

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

2022-07-13 Thread Joseph Huber via Phabricator via cfe-commits
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

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

2022-06-17 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam updated this revision to Diff 438004. saiislam added a comment. clang-formatted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128090/new/ https://reviews.llvm.org/D128090 Files: clang/include/clang/Driver/Driver.h

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

2022-06-17 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam created this revision. saiislam added reviewers: jdoerfert, JonChesterfield, jhuber6, yaxunl. Herald added a subscriber: guansong. Herald added a project: All. saiislam requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: