clang
15.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 (CudaArch Arch) const |
Emit an error if Version does not support the given Arch. More... | |
bool | isValid () const |
Check whether we detected a valid Cuda install. More... | |
void | print (raw_ostream &OS) const |
Print information about the detected CUDA installation. More... | |
CudaVersion | version () const |
Get the detected Cuda install's version. More... | |
StringRef | getInstallPath () const |
Get the detected Cuda installation path. More... | |
StringRef | getBinPath () const |
Get the detected path to Cuda's bin directory. More... | |
StringRef | getIncludePath () const |
Get the detected Cuda Include path. More... | |
StringRef | getLibPath () const |
Get the detected Cuda library path. More... | |
StringRef | getLibDevicePath () const |
Get the detected Cuda device library path. More... | |
std::string | getLibDeviceFile (StringRef Gpu) const |
Get libdevice file for given architecture. More... | |
void | WarnIfUnsupportedVersion () |
CudaInstallationDetector::CudaInstallationDetector | ( | const Driver & | D, |
const llvm::Triple & | HostTriple, | ||
const llvm::opt::ArgList & | Args | ||
) |
void CudaInstallationDetector::AddCudaIncludeArgs | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args | ||
) | const |
Definition at line 284 of file Cuda.cpp.
References clang::driver::Driver::Diag(), isValid(), P, and clang::driver::Driver::ResourceDir.
Referenced by clang::driver::toolchains::Linux::AddCudaIncludeArgs(), clang::driver::toolchains::FreeBSD::AddCudaIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddCudaIncludeArgs(), clang::driver::toolchains::CudaToolChain::AddCudaIncludeArgs(), and clang::driver::toolchains::Darwin::AddCudaIncludeArgs().
void CudaInstallationDetector::CheckCudaVersionSupportsArch | ( | CudaArch | 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 308 of file Cuda.cpp.
References clang::CudaArchToString(), clang::CudaVersionToString(), clang::driver::Driver::Diag(), int, clang::MaxVersionForCudaArch(), clang::MinVersionForCudaArch(), and clang::UNKNOWN.
Referenced by clang::driver::toolchains::CudaToolChain::AddCudaIncludeArgs().
|
inline |
Get the detected path to Cuda's bin directory.
Definition at line 70 of file Cuda.h.
Referenced by clang::driver::toolchains::CudaToolChain::CudaToolChain().
|
inline |
Get the detected Cuda Include path.
Definition at line 72 of file Cuda.h.
Referenced by clang::driver::toolchains::CudaToolChain::AddClangSystemIncludeArgs().
|
inline |
Get the detected Cuda installation path.
Definition at line 68 of file Cuda.h.
Referenced by clang::driver::tools::LinkerWrapper::ConstructJob().
|
inline |
Get libdevice file for given architecture.
Definition at line 78 of file Cuda.h.
Referenced by clang::driver::toolchains::CudaToolChain::addClangTargetOptions().
|
inline |
|
inline |
|
inline |
Check whether we detected a valid Cuda install.
Definition at line 58 of file Cuda.h.
Referenced by clang::driver::toolchains::CudaToolChain::AddClangSystemIncludeArgs(), AddCudaIncludeArgs(), clang::driver::tools::LinkerWrapper::ConstructJob(), clang::driver::toolchains::CudaToolChain::CudaToolChain(), and print().
void CudaInstallationDetector::print | ( | raw_ostream & | OS | ) | const |
Print information about the detected CUDA installation.
Definition at line 325 of file Cuda.cpp.
References clang::CudaVersionToString(), and isValid().
Referenced by clang::driver::toolchains::MSVCToolChain::printVerboseInfo(), clang::driver::toolchains::Generic_GCC::printVerboseInfo(), and clang::driver::toolchains::Darwin::printVerboseInfo().
|
inline |
Get the detected Cuda install's version.
Definition at line 63 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 102 of file Cuda.cpp.
References clang::CudaVersionToString(), clang::FULLY_SUPPORTED, clang::PARTIALLY_SUPPORTED, and string().
Referenced by clang::driver::toolchains::CudaToolChain::CudaToolChain().