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

2019-05-02 Thread Michael Kruse via cfe-commits
- > De : Michael Kruse > Envoyé : 1 mai 2019 17:23 > À : reviews+d42642+public+5dc9c99d2f2d3...@reviews.llvm.org; Alexandre Ganea > via Phabricator > Cc : hah...@hahnjo.de; jle...@google.com; t...@google.com; Alexandre Ganea > ; cfe-commits ; > llvm-commits ; sylves

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

2019-05-02 Thread Alexandre Ganea via cfe-commits
+d42642+public+5dc9c99d2f2d3...@reviews.llvm.org; Alexandre Ganea via Phabricator Cc : hah...@hahnjo.de; jle...@google.com; t...@google.com; Alexandre Ganea ; cfe-commits ; llvm-commits ; sylvestre.le...@gmail.com Objet : Re: [PATCH] D42642: [CUDA] Detect installation in PATH Hi, I had my own

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

2019-05-01 Thread Michael Kruse via cfe-commits
Hi, I had my own difficulties with this. It depends on how the repository containing the symlink has been checked-out. For instance: 1. Using a windows git (such as git extensions, mingw-git, git for windows) 2. Using git inside wsl on a drvfs mount (i.e. a windows folder mounted into the Unix

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

2019-05-01 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a subscriber: rnk. aganea added a comment. So it turns out this is a symlink issue. The file `clang/trunk/test/Driver/Inputs/CUDA-symlinks/usr/bin/ptxas` has been synchronized on my Windows 10 PC as a regular text file, not a symlink. It looks like TortoiseSVN doesn't implement

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

2019-04-26 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld marked an inline comment as done. Hahnfeld added a comment. Herald added a subscriber: ormris. In D42642#1479013 , @aganea wrote: > Just a quick heads-up - the `cuda-detect-path.cu` test fails on WSL/Ubuntu > 18.04: Hmm, maybe that's because

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

2019-04-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Herald added a project: LLVM. Just a quick heads-up - the `cuda-detect-path.cu` test fails on WSL/Ubuntu 18.04: aganea@MTL-BJ842:/mnt/f/svn/buildWSL$ /usr/bin/python3.6 bin/llvm-lit -vv ../clang/test/Driver/cuda-detect-path.cu llvm-lit:

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

2018-01-31 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323848: [CUDA] Detect installation in PATH (authored by Hahnfeld, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42642?vs=132103=132104#toc

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

2018-01-31 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 132103. Hahnfeld marked 3 inline comments as done. Hahnfeld added a comment. Add some `sysroot` arguments to new test to make sure it doesn't accidentally find CUDA installations in the system. https://reviews.llvm.org/D42642 Files:

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

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. LGTM. Comment at: lib/Driver/ToolChains/Cuda.cpp:96-105 + if (llvm::ErrorOr ptxas = + llvm::sys::findProgramByName("ptxas")) { +SmallString<256> ptxasAbsolutePath; +

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

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld marked 5 inline comments as done. Hahnfeld added a subscriber: sylvestre.ledru. Hahnfeld added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:96-105 + if (llvm::ErrorOr ptxas = + llvm::sys::findProgramByName("ptxas")) { +

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

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:96-105 + if (llvm::ErrorOr ptxas = + llvm::sys::findProgramByName("ptxas")) { +SmallString<256> ptxasAbsolutePath; +llvm::sys::fs::real_path(*ptxas, ptxasAbsolutePath); + +

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

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 132029. Hahnfeld added a comment. Follow symlinked `ptxas` executables. https://reviews.llvm.org/D42642 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/Inputs/CUDA-nolibdevice/usr/local/cuda/bin/ptxas

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

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D42642#992137, @tra wrote: > I've thought a bit more about this and there's another quirk -- symlinks. > > What if we've found /usr/bin/ptxas and is a symlink pointing to the real > ptxas in the CUDA installation? If we add /usr to the list

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

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I've thought a bit more about this and there's another quirk -- symlinks. What if we've found /usr/bin/ptxas and is a symlink pointing to the real ptxas in the CUDA installation? If we add /usr to the list of candidates it will not help us at all. We should probably find

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

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld 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; tra

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

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
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

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

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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 > > >

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

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 131963. Hahnfeld added a comment. Check for `libdevice` in candidates from `PATH`. https://reviews.llvm.org/D42642 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/Inputs/CUDA-nolibdevice/usr/local/cuda/bin/ptxas

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

2018-01-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. 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, > >

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

2018-01-29 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. 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

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

2018-01-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Can we document this behavior in https://llvm.org/docs/CompileCudaWithLLVM.html (in the LLVM repo)? Totally fine if you want to do this in a separate patch. Repository: rC Clang https://reviews.llvm.org/D42642 ___

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

2018-01-29 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. 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

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

2018-01-29 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Hahnfeld added reviewers: jlebar, tra. Herald added a subscriber: cfe-commits. If the CUDA toolkit is not installed to its default locations in /usr/local/cuda, the user is forced to specify --cuda-path. This is tedious and the driver can be smarter if well-known