Commit e98b107
committed
[HIP] change default offload archs
Currently, HIP uses gfx906 as the default offload
arch, which only works on systems with gfx906.
For non-interactive uses, this is less of a concern
since they all set explicit offload archs for supported
GPU's. The only use of default offload arch is when
the clang wrapper hipcc is used as a C++ compiler
during compiler detection of cmake, where the default
offload arch is used to compile a C++ program as HIP
program and executed. However since there is no
kernel, the default offload arch just works.
However, gfx906 as default offload arch is very
inconenient for interactive users since in most cases
they would like to compile for the GPU on the system.
With this patch, if AMD GPU's are detected on the system,
they will be used as default offload archs for HIP.
Otherwise, if amd-llvm-spirv is found and executable,
amdgcnspirv will be used as the default offload arch,
since it works for all AMD GPU's supporting HIP.
Otherwise, the original default offload arch is used,
which is gfx906.1 parent b249b49 commit e98b107
File tree
4 files changed
+36
-2
lines changed- clang
- include/clang/Driver
- lib/Driver
- test/Driver
4 files changed
+36
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
783 | 787 | | |
784 | 788 | | |
785 | 789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3503 | 3503 | | |
3504 | 3504 | | |
3505 | 3505 | | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
3506 | 3509 | | |
3507 | 3510 | | |
3508 | 3511 | | |
| |||
4825 | 4828 | | |
4826 | 4829 | | |
4827 | 4830 | | |
4828 | | - | |
| 4831 | + | |
| 4832 | + | |
4829 | 4833 | | |
4830 | 4834 | | |
4831 | 4835 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1574 | 1574 | | |
1575 | 1575 | | |
1576 | 1576 | | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
1577 | 1603 | | |
1578 | 1604 | | |
1579 | 1605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
0 commit comments