This revision was automatically updated to reflect the committed changes.
Closed by commit rL277542: [CUDA] Fix libdevice selection. (authored by tra).
Changed prior to commit:
https://reviews.llvm.org/D23037?vs=66579&id=66589#toc
Repository:
rL LLVM
https://reviews.llvm.org/D23037
Files:
tra marked an inline comment as done.
tra added a comment.
https://reviews.llvm.org/D23037
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tra updated this revision to Diff 66579.
tra added a comment.
Now that https://reviews.llvm.org/D23042 / r277537 makes sure that
CudaToolchain is only used on device side, we can
remove defaults for -march and restore asserts() ensuring that -march is added
by the driver.
https://reviews.llvm
jlebar added inline comments.
Comment at: lib/Driver/ToolChains.cpp:4773
@@ +4772,3 @@
+ StringRef GpuArch =
+ DriverArgs.getLastArgValue(options::OPT_march_EQ, "sm_20");
+ std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch);
Hm. I total
tra updated this revision to Diff 66392.
tra added a comment.
Added tests for libdevice mapping correctness.
https://reviews.llvm.org/D23037
Files:
include/clang/Basic/DiagnosticDriverKinds.td
lib/Driver/ToolChains.cpp
test/Driver/Inputs/CUDA_80/usr/local/cuda/nvvm/libdevice/libdevice.co
tra added inline comments.
Comment at: lib/Driver/ToolChains.cpp:4773
@@ +4772,3 @@
+ StringRef GpuArch =
+ DriverArgs.getLastArgValue(options::OPT_march_EQ, "sm_20");
+ std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch);
jlebar wrote:
>
jlebar added inline comments.
Comment at: lib/Driver/ToolChains.cpp:4773
@@ +4772,3 @@
+ StringRef GpuArch =
+ DriverArgs.getLastArgValue(options::OPT_march_EQ, "sm_20");
+ std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch);
I *think* ma
tra created this revision.
tra added a reviewer: jlebar.
tra added a subscriber: cfe-commits.
This makes clang's libdevice selection match that of NVCC as described in
http://docs.nvidia.com/cuda/libdevice-users-guide/basic-usage.html#version-selection
If required libdevice variant is not found,