[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 13 10:58:40 PDT 2017

Hahnfeld marked 4 inline comments as done.
Hahnfeld added inline comments.

Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182
-    // This code prevents IsValid from being set when
-    // no libdevice has been found.
-    bool allEmpty = true;
-    std::string LibDeviceFile;
-    for (auto key : LibDeviceMap.keys()) {
-      LibDeviceFile = LibDeviceMap.lookup(key);
-      if (!LibDeviceFile.empty())
tra wrote:
> Hahnfeld wrote:
> > tra wrote:
> > > I'd keep this code. It appears to serve useful purpose as it requires CUDA installation to have at least some libdevice library in it.  It gives us a change to find a valid installation, instead of ailing some time later when we ask for a libdevice file and fail because there are none.
> > We had some internal discussions about this after I submitted the patch here.
> > 
> > The main question is: Do we want to support CUDA installations without libdevice and are there use cases for that? I'd say that the user should be able to use a toolchain without libdevice together with `-nocudalib`.
> Sounds reasonable. How about keeping the code but putting it under `if(!hasArg(nocudalib))`?
Ok, I'll do that in a separate patch and keep the code here for now.


More information about the cfe-commits mailing list