[PATCH] D14556: [CUDA] Detect and link with CUDA's libdevice bitcode library.

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 12 14:10:46 PST 2015


echristo accepted this revision.
echristo added a comment.
This revision is now accepted and ready to land.

A couple of inline comments, but this is fine for now.

We need a command line option to select CUDA version as well.

-eric


================
Comment at: lib/Driver/ToolChains.cpp:1635
@@ -1634,2 +1634,3 @@
     CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda");
+    CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-7.5");
     CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-7.0");
----------------
Commit this part separately as an "add a newer version of cuda that we support".

================
Comment at: lib/Driver/ToolChains.cpp:4082
@@ +4081,3 @@
+    // than LLVM defaults to. Use PTX4.2 which is the PTX version that
+    // came with CUDA-7.0.
+    CC1Args.push_back("-target-feature");
----------------
Explain in a bit more detail here, I understand why, but it's oddly complicated and annoying.

We should look into making this part of TargetInfo with the cuda version being a feature that then turns on associated minimal cpu features etc.


http://reviews.llvm.org/D14556





More information about the cfe-commits mailing list