tra added a comment. In D128752#3616579 <https://reviews.llvm.org/D128752#3616579>, @jhuber6 wrote:
> In D128752#3616553 <https://reviews.llvm.org/D128752#3616553>, @tra wrote: > >>> we no longer will have a cached CUDA installation so we will usually create >>> it twice. >> >> Does that result in extra output in case we find an unexpected CUDA version, >> or when compiler is run with `-v` ? >> >> We may want to wrap installation detector creation into some sort of >> singleton creation function. > > We already create another one for the call coming from Clang, this patch just > gets rid of the other call. I think the printouts you're talking about come > from the variable in the CUDA toolchain specifically. Here we simply create > one to get the version and throw it away. It's not ideal to do the same work > twice, so we could wrap this into some singleton interface. Maybe a static > optional value inside of the `Toolchains/Cuda.cpp` file wither a getter that > returns a reference to it. Though I don't think this is likely to be a > bottleneck. We already heard complaints that searching for CUDA installation in multiple places does add a measurable delay when the search hits NFS-mounted directories. Replacing uses of `CudaInstallation` with a getter function returning a reference to a singleton would be great. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128752/new/ https://reviews.llvm.org/D128752 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits