[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-09-27 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D108247#3025415 , @tambre wrote: >> Another workaround would be to place a fake /usr/lib/cuda/include/cuda.h >> with something like this: > > My CMake CI bot [[ https://open.cdash.org/test/498767666 | encountered > `cmath` templa

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-09-27 Thread Raul Tambre via Phabricator via cfe-commits
tambre added a comment. In D108247#3025238 , @tra wrote: > So, what's the current state of affairs regarding CUDA SDK layout in debian? `/usr/bin`: most executables , `nvcc` and `

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-09-27 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. So, what's the current state of affairs regarding CUDA SDK layout in debian? Clang does rely on very particular ordering of includes, so having CUDA headers in a location clang does not expect will lead to issues sooner or later. If the headers are not available where --cuda-

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-09-26 Thread Raul Tambre via Phabricator via cfe-commits
tambre added a comment. This unfortunately breaks using Debian distribution CUDA. The Debian/Ubuntu special case

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-23 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3db8e486e560: [CUDA] Improve CUDA version detection and diagnostics. (authored by tra). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108247/new/ https://re

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-19 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:209-211 + Version = FS.exists(LibDevicePath + "/libdevice.10.bc") +? Version = CudaVersion::NEW +: Version = CudaVersion::CUDA_70; tra wr

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-19 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 367532. tra added a comment. Fixed an error spotted by reviewer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108247/new/ https://reviews.llvm.org/D108247 Files: clang/include/clang/Basic/Cuda.h clang/include

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:209-211 + Version = FS.exists(LibDevicePath + "/libdevice.10.bc") +? Version = CudaVersion::NEW +: Version = CudaVersion::CUDA_70; Hahnfeld wr

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-19 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:209-211 + Version = FS.exists(LibDevicePath + "/libdevice.10.bc") +? Version = CudaVersion::NEW +: Version = CudaVersion::CUDA_70; The co

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:103-104 +std::string VersionString = CudaVersionToString(Version); +if (!VersionString.empty()) + VersionString += " "; +D.Diag(diag::warn_drv_new_cuda_version) Hahnfeld

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-18 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 367261. tra added a comment. Prepend space to the version string. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108247/new/ https://reviews.llvm.org/D108247 Files: clang/include/clang/Basic/Cuda.h clang/includ

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-18 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld accepted this revision. Hahnfeld added a comment. This revision is now accepted and ready to land. Otherwise LGTM Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:103-104 +std::string VersionString = CudaVersionToString(Version); +if (!VersionString.empty()) +

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/Driver/cuda-version-check.cu:75 -// UNKNOWN_VERSION_V: unknown CUDA version: version.txt:{{.*}}; assuming the latest supported version -// UNKNOWN_VERSION_H: unknown CUDA version: cuda.h: CUDA_VERSION={{.*}}; assuming the late

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-18 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 367246. tra edited the summary of this revision. tra added a comment. Do not report the version if we don't know it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108247/new/ https://reviews.llvm.org/D108247 Files

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. The change about amdgpu LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108247/new/ https://reviews.llvm.org/D108247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-18 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: clang/test/Driver/cuda-version-check.cu:75 -// UNKNOWN_VERSION_V: unknown CUDA version: version.txt:{{.*}}; assuming the latest supported version -// UNKNOWN_VERSION_H: unknown CUDA version: cuda.h: CUDA_VERSION={{.*}}; assuming the

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-17 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: Hahnfeld, yaxunl. Herald added subscribers: dexonsmith, bixia. tra requested review of this revision. Herald added a project: clang. Always use cuda.h to detect CUDA version. It's a more universal approach compared to version.txt which is no longer p