Commit 561dcb2
authored
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.
1 parent 369be31 commit 561dcb2
File tree
2 files changed
+5
-2
lines changed- clang
- include/clang/Driver
- test/Driver
2 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
1132 | | - | |
| 1132 | + | |
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
1139 | 1138 | | |
1140 | 1139 | | |
1141 | 1140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
0 commit comments