This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Detect and link with CUDA's libdevice bitcode library.
ClosedPublic

Authored by tra on Nov 10 2015, 3:48 PM.

Details

Summary

This is libdevice-related part extracted from D13170

  • added detection of libdevice bitcode file and API to find one appropriate for the GPU we're compiling for.
  • pass additional cc1 options for linking with detected libdevice bitcode
  • added -nocudalib to prevent automatic linking with libdevice
  • added test cases to verify new functionality

Diff Detail

Event Timeline

tra updated this revision to Diff 39863.Nov 10 2015, 3:48 PM
tra retitled this revision from to [CUDA] Detect and link with CUDA's libdevice bitcode library..
tra updated this object.
tra added a reviewer: echristo.
tra added a subscriber: cfe-commits.
echristo accepted this revision.Nov 12 2015, 2:10 PM
echristo edited edge metadata.

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

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

-eric

lib/Driver/ToolChains.cpp
1635

Commit this part separately as an "add a newer version of cuda that we support".

4082

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.

This revision is now accepted and ready to land.Nov 12 2015, 2:10 PM
This revision was automatically updated to reflect the committed changes.