Commit bc7f967
committed
[SYCL][CUDA] Add -fcuda-prec-sqrt flag
This patch add `__nvvm_reflect` support for `__CUDA_PREC_SQRT` and adds
a `-Xclang -fcuda-prec-sqrt` flag which is equivalent to the `nvcc`
`-prec-sqrt` flag, except that it defaults to `false` for `clang++` and
to `true` for `nvcc`.
The reason for that is that the SYCL specification doesn't require a
correctly rounded `sqrt` so we likely want to keep the fast `sqrt` as a
default and use the flag when higher precision is required.
See additional discussion on intel#4041 and intel#51161 parent a95c12a commit bc7f967
File tree
5 files changed
+22
-1
lines changed- clang
- include/clang
- Basic
- Driver
- lib/CodeGen
- llvm/lib/Target/NVPTX
- sycl/doc
5 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
983 | 988 | | |
984 | 989 | | |
985 | 990 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
761 | | - | |
| 761 | + | |
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
| 768 | + | |
| 769 | + | |
768 | 770 | | |
769 | 771 | | |
770 | 772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
822 | 828 | | |
823 | 829 | | |
824 | 830 | | |
| |||
0 commit comments