Page MenuHomePhabricator

[CUDA] Added CUDA installation detector class.
ClosedPublic

Authored by tra on Sep 18 2015, 3:52 PM.

Details

Summary

The class searches for a CUDA installation directory and provides accessors for relevant bits of info about it.

Added new option --cuda-path=<path> which allows overriding default search paths. If it's not specified we look for CUDA installation in
/usr/include/cuda and /usr/include/cuda-7.0

Diff Detail

Repository
rL LLVM

Event Timeline

tra updated this revision to Diff 35149.Sep 18 2015, 3:52 PM
tra retitled this revision from to [CUDA] Added CUDA installation detector class. .
tra updated this object.
tra added a reviewer: echristo.
tra added a subscriber: cfe-commits.

Any suggestions how to test this?

echristo edited edge metadata.Sep 21 2015, 4:22 PM

Make one of those big input directory sets of tests and run with/without that option on it?

-eric

tra added a comment.Sep 21 2015, 4:38 PM

I'll add tests for install dir detection. As for detection of bitcode files, perhaps I should remove it from this patch and commit it along with the code that's going to use it and where I can test it.

In D12989#250247, @tra wrote:

I'll add tests for install dir detection. As for detection of bitcode files, perhaps I should remove it from this patch and commit it along with the code that's going to use it and where I can test it.

Seems reasonable.

Thanks!

-eric

tra updated this revision to Diff 35333.Sep 21 2015, 5:48 PM
tra updated this object.
tra edited edge metadata.

Added test case for CUDA detection.
Removed libdevice file detection for now.

echristo accepted this revision.Sep 22 2015, 5:06 PM
echristo edited edge metadata.

LGTM.

Thanks!

-eric

This revision is now accepted and ready to land.Sep 22 2015, 5:06 PM
tra updated this revision to Diff 35531.Sep 23 2015, 11:07 AM
tra edited edge metadata.

Removed unneeded temporary variable.

This revision was automatically updated to reflect the committed changes.
chapuni added inline comments.
cfe/trunk/lib/Driver/ToolChains.cpp
1492

Fixed in r248459.

1498

You were trying to make StringRef from temporary string concatenator.

Aha, nice catch!

-eric

tra added a subscriber: tra.Sep 24 2015, 10:03 AM

Thank you for the fix.

--Artem