clang 20.0.0git
|
A class to find a viable CUDA installation. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Driver/ToolChains/Cuda.h"
Public Member Functions | |
CudaInstallationDetector (const Driver &D, const llvm::Triple &HostTriple, const llvm::opt::ArgList &Args) | |
void | AddCudaIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
void | CheckCudaVersionSupportsArch (OffloadArch Arch) const |
Emit an error if Version does not support the given Arch. | |
bool | isValid () const |
Check whether we detected a valid Cuda install. | |
void | print (raw_ostream &OS) const |
Print information about the detected CUDA installation. | |
CudaVersion | version () const |
Get the detected Cuda install's version. | |
StringRef | getInstallPath () const |
Get the detected Cuda installation path. | |
StringRef | getBinPath () const |
Get the detected path to Cuda's bin directory. | |
StringRef | getIncludePath () const |
Get the detected Cuda Include path. | |
StringRef | getLibDevicePath () const |
Get the detected Cuda device library path. | |
std::string | getLibDeviceFile (StringRef Gpu) const |
Get libdevice file for given architecture. | |
void | WarnIfUnsupportedVersion () |
CudaInstallationDetector::CudaInstallationDetector | ( | const Driver & | D, |
const llvm::Triple & | HostTriple, | ||
const llvm::opt::ArgList & | Args | ||
) |
Definition at line 138 of file Cuda.cpp.
References clang::CUDA_70, clang::CUDA_80, clang::CUDA_90, D, E, clang::FileName, int, clang::driver::Distro::IsDebian(), clang::IsNVIDIAOffloadArch(), clang::driver::Distro::IsUbuntu(), clang::LAST, clang::NEW, clang::OffloadArchToString(), Path, clang::SM_30, and clang::UNKNOWN.
void CudaInstallationDetector::AddCudaIncludeArgs | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args | ||
) | const |
Definition at line 293 of file Cuda.cpp.
References clang::driver::Driver::Diag(), isValid(), P, and clang::driver::Driver::ResourceDir.
Referenced by clang::driver::toolchains::CudaToolChain::AddCudaIncludeArgs().
void CudaInstallationDetector::CheckCudaVersionSupportsArch | ( | OffloadArch | Arch | ) | const |
Emit an error if Version does not support the given Arch.
If either Version or Arch is unknown, does not emit an error. Emits at most one error per Arch.
Definition at line 317 of file Cuda.cpp.
References clang::CudaVersionToString(), clang::driver::Driver::Diag(), int, clang::MaxVersionForOffloadArch(), clang::MinVersionForOffloadArch(), clang::OffloadArchToString(), and clang::UNKNOWN.
Referenced by clang::driver::toolchains::CudaToolChain::AddCudaIncludeArgs().
|
inline |
|
inline |
Get the detected Cuda Include path.
Definition at line 70 of file Cuda.h.
Referenced by clang::driver::toolchains::CudaToolChain::AddClangSystemIncludeArgs().
|
inline |
Get the detected Cuda installation path.
Definition at line 66 of file Cuda.h.
Referenced by clang::driver::tools::LinkerWrapper::ConstructJob().
|
inline |
Get libdevice file for given architecture.
Definition at line 74 of file Cuda.h.
Referenced by clang::driver::toolchains::CudaToolChain::addClangTargetOptions().
|
inline |
|
inline |
Check whether we detected a valid Cuda install.
Definition at line 56 of file Cuda.h.
Referenced by clang::driver::toolchains::CudaToolChain::AddClangSystemIncludeArgs(), AddCudaIncludeArgs(), clang::driver::tools::LinkerWrapper::ConstructJob(), clang::driver::Driver::CreateOffloadingDeviceToolChains(), and print().
void CudaInstallationDetector::print | ( | raw_ostream & | OS | ) | const |
Print information about the detected CUDA installation.
Definition at line 334 of file Cuda.cpp.
References clang::CudaVersionToString(), and isValid().
|
inline |
Get the detected Cuda install's version.
Definition at line 61 of file Cuda.h.
References clang::NEW, and clang::PARTIALLY_SUPPORTED.
Referenced by clang::driver::toolchains::CudaToolChain::addClangTargetOptions(), and clang::driver::tools::NVPTX::getNVPTXTargetFeatures().
void CudaInstallationDetector::WarnIfUnsupportedVersion | ( | ) |
Definition at line 124 of file Cuda.cpp.
References clang::CudaVersionToString(), clang::driver::Driver::Diag(), clang::FULLY_SUPPORTED, and clang::PARTIALLY_SUPPORTED.
Referenced by clang::driver::Driver::CreateOffloadingDeviceToolChains().