[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-10-29 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov added a comment. In D60220#1725633 , @dim wrote: > $ cat check-isnan.cpp > #include > > int check_isnan(double d) > { > return ::__isnan(d); > } > $ clang -c check-isnan.cpp > Why can't the regular `isnan` be used instead? Or

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-10-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D60220#1725633 , @dim wrote: > Hm, I would really say that `__isnan` and the other `__` prefixed functions > are Linuxisms, or more accurately, glibc-isms. They also don't exist on e.g. > macOS: > > Why can't the regular `isnan`

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-10-29 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Hm, I would really say that `__isnan` and the other `__` prefixed functions are Linuxisms, or more accurately, glibc-isms. They also don't exist on e.g. macOS: $ cat check-isnan.cpp #include int check_isnan(double d) { return ::__isnan(d); } $ clang -

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-10-28 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov added a comment. >> It looks like CUDA doesn't support `double` argument for device function >> __isnan on FreeBSD. > > It's actually the opposite -- FreeBSD does not provide *host*-side > `__isnan(double)` -- the error complains that it's the host code that tried > to use `__isnan` an

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-10-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D60220#1723458 , @emankov wrote: > In D60220#1723350 , @6yearold wrote: > > > I'm seeing quite similar errors on FreeBSD with Clang 8 and 9: > > Any idea how to fix this? > > > It looks like

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-10-28 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov added a comment. In D60220#1723350 , @6yearold wrote: > I'm seeing quite similar errors on FreeBSD with Clang 8 and 9: > Any idea how to fix this? It looks like CUDA doesn't support `double` argument for device function __isnan on FreeBSD. 1.

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-10-28 Thread Gleb Popov via Phabricator via cfe-commits
6yearold added a comment. I'm seeing quite similar errors on FreeBSD with Clang 8 and 9: In file included from :1: In file included from /usr/local/llvm90/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:204: /usr/home/arr/cuda/var/cuda-repo-10-0-local-10.0.130-410.48/usr/local/cuda

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov added a comment. In D60220#1456449 , @tra wrote: > It's not a big deal at the moment -- there are no `long double` users in CUDA > on linux yet. You can clean up in another commit. > BTW, you may want to make commit description somewhat more conc

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D60220#1456430 , @emankov wrote: > Oooh, sorry, but I've just pushed the fix. But with the following words: "Add > missing long double device functions' declarations. Provide only declarations > to prevent any use of long double o

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov added a comment. Oooh, sorry, but I've just pushed the fix. But with the following words: "Add missing long double device functions' declarations. Provide only declarations to prevent any use of long double on the device side, because CUDA does not support long double on the device side

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Evgeny Mankov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC357779: [CUDA][Windows] Last fix for the clang Bug 38811 "Clang fails to compile with… (authored by emankov, committed by ). Changed prior to commit: https://reviews.llvm.org/D60220?vs=193874&id=193904#

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. One more thing -- perhaps the `long double` declarations should be put under `#ifndef _MSC_VER` in all the files to make the change unobservable on non-windows platforms. Adding a comment why we only have declarations for these functions would also be helpful. CHANGES SI

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Thank you for fixing this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60220/new/ https://reviews.llvm.org/D60220 ___ cfe-commits mailing li

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov updated this revision to Diff 193874. emankov added a comment. Provide only declarations for missing long double device functions to prevent any use of `long double` on the device side, because CUDA does not support `long double` on the device side. [Testing] {Windows 10, Ubuntu 16.04.5

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Headers/__clang_cuda_cmath.h:81-90 +__DEVICE__ bool isinf(long double __x) { return ::__isinfl(__x); } __DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); } // For inscrutable reasons, __finite(), the double-precision

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-03 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov created this revision. emankov added a reviewer: tra. emankov added a project: clang. Herald added a subscriber: cfe-commits. Last fix for the clang Bug 38811 "Clang fails to compile with CUDA-9.x on Windows". **[IMPORTANT]** With that last f