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

Gleb Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 28 07:01:07 PDT 2019


6yearold added a comment.

I'm seeing quite similar errors on FreeBSD with Clang 8 and 9:

  In file included from <built-in>: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-10.0//include/crt/math_functions.hpp:2910:7: error: no matching function for call to '__isnan'
    if (__isnan(a)) {
        ^~~~~~~
  /usr/local/llvm90/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
  __DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
                 ^
  In file included from <built-in>: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-10.0//include/crt/math_functions.hpp:2934:7: error: no matching function for call to '__isnan'
    if (__isnan(a)) {
        ^~~~~~~
  /usr/local/llvm90/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
  __DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
                 ^
  In file included from <built-in>: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-10.0//include/crt/math_functions.hpp:2960:7: error: no matching function for call to '__isnan'
    if (__isnan(a)) {
        ^~~~~~~
  /usr/local/llvm90/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
  __DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
                 ^
  In file included from <built-in>: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-10.0//include/crt/math_functions.hpp:3090:7: error: no matching function for call to '__isnan'
    if (__isnan(a)) {
        ^~~~~~~
  /usr/local/llvm90/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
  __DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
                 ^
  In file included from <built-in>: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-10.0//include/crt/math_functions.hpp:3196:7: error: no matching function for call to '__isnan'
    if (__isnan(a)) {
        ^~~~~~~
  /usr/local/llvm90/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
  __DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
                 ^

Any idea how to fix this?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60220/new/

https://reviews.llvm.org/D60220





More information about the cfe-commits mailing list