https://bugs.llvm.org/show_bug.cgi?id=52224

            Bug ID: 52224
           Summary: Missing GPU Builtins when compiling CUDA to bitcode on
                    Windows
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: CUDA
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

When compiling CUDA device code on Windows to bitcode using clang++, it seems
that implementations are missing for a couple of GPU builtins for input type
float. Below is a list of functions I found for which the implementations are
missing.

round, erf, erfc, hypot, expm1, log2, log1p, asinh, acosh and atanh.

The list is not exhaustive and there may be other functions also. Below is the
reproduction code and command that can be used.

File: repro.cu
Code:
extern "C" __device__ float reprof(float in) {
    return ::round(in);
}

Compilation Command:
clang++ --cuda-gpu-arch=sm_50 --cuda-path=<PATH_TO_CUDA> --cuda-device-only -O2
-S -emit-llvm repro.cu -o repro.ll

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to