[PATCH] D42642: [CUDA] Detect installation in PATH

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 30 10:43:26 PST 2018


tra added inline comments.


================
Comment at: lib/Driver/ToolChains/Cuda.cpp:206
     // -nocudalib hasn't been specified.
-    if (LibDeviceMap.empty() && !Args.hasArg(options::OPT_nocudalib))
+    if (CheckLibDevice && LibDeviceMap.empty())
       continue;
----------------
I think this may be too strict.

Checking directory structure for the purposes of detecting CUDA SDK should work well enough to weed out false detection for 'split' CUDA installation and we've verified libdevice directory presence above. 

Checking for libdevice bitcode is somewhat orthogonal to this. IMO, regardless of how we've found the installation directory, whether we have suitable libdevice version there should not matter if user explicitly passed -nocudalib. Insisting on libdevice presence in this situation would be somewhat surprising. 







https://reviews.llvm.org/D42642





More information about the cfe-commits mailing list