Hahnfeld added a comment. In https://reviews.llvm.org/D42642#991154, @tra wrote:
> In https://reviews.llvm.org/D42642#991127, @Hahnfeld wrote: > > > In https://reviews.llvm.org/D42642#990976, @tra wrote: > > > > > Some linux distributions integrate CUDA into the standard directory > > > structure. I.e. binaries go into /usr/bin, headers into /usr/include, > > > bitcode goes somewhere else, etc. ptxas will be found, but we would still > > > fail to detect CUDA. I'd add one more test case to make sure that's > > > still the case. > > > > > > I'm not sure how this can work, we only require `bin/` and `include/` to > > exist, and `nvvm/libdevice/` if `-nocudalib` isn't specified. I agree this > > can be a problem because the defaults might detect an invalid > > installation... > > > Good point. Perhaps we want to be more strict about CUDA installation > checking if we've found it indirectly via PATH (as opposed to explicit > --cuda-path or a known common install path). > Should we always check for nvvm/libdevice directory? It's unlikely to be > under /usr or /usr/local and it will be always present in a CUDA installation > of all currently supported CUDA versions. That sounds like a sane check. I updated the implementation and added corresponding checks. https://reviews.llvm.org/D42642 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits