clang
13.0.0git
|
A class to find a viable ROCM installation TODO: Generalize to handle libclc. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Driver/ToolChains/ROCm.h"
Public Member Functions | |
RocmInstallationDetector (const Driver &D, const llvm::Triple &HostTriple, const llvm::opt::ArgList &Args, bool DetectHIPRuntime=true, bool DetectDeviceLib=false) | |
llvm::SmallVector< std::string, 12 > | getCommonBitcodeLibs (const llvm::opt::ArgList &DriverArgs, StringRef LibDeviceFile, bool Wave64, bool DAZ, bool FiniteOnly, bool UnsafeMathOpt, bool FastRelaxedMath, bool CorrectSqrt) const |
Get file paths of default bitcode libraries common to AMDGPU based toolchains. More... | |
bool | hasHIPRuntime () const |
Check whether we detected a valid HIP runtime. More... | |
bool | hasDeviceLibrary () const |
Check whether we detected a valid ROCm device library. More... | |
void | print (raw_ostream &OS) const |
Print information about the detected ROCm installation. More... | |
StringRef | getInstallPath () const |
Get the detected Rocm install's version. More... | |
StringRef | getIncludePath () const |
Get the detected path to Rocm's bin directory. More... | |
StringRef | getLibPath () const |
Get the detected Rocm library path. More... | |
StringRef | getLibDevicePath () const |
Get the detected Rocm device library path. More... | |
StringRef | getOCMLPath () const |
StringRef | getOCKLPath () const |
StringRef | getOpenCLPath () const |
StringRef | getHIPPath () const |
StringRef | getAsanRTLPath () const |
Returns empty string of Asan runtime library is not available. More... | |
StringRef | getWavefrontSize64Path (bool Enabled) const |
StringRef | getFiniteOnlyPath (bool Enabled) const |
StringRef | getUnsafeMathPath (bool Enabled) const |
StringRef | getDenormalsAreZeroPath (bool Enabled) const |
StringRef | getCorrectlyRoundedSqrtPath (bool Enabled) const |
std::string | getLibDeviceFile (StringRef Gpu) const |
Get libdevice file for given architecture. More... | |
void | AddHIPIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
void | detectDeviceLibrary () |
void | detectHIPRuntime () |
std::vector< std::string > | getRocmDeviceLibPathArg () const |
Get the values for –rocm-device-lib-path arguments. More... | |
StringRef | getRocmPathArg () const |
Get the value for –rocm-path argument. More... | |
StringRef | getHIPVersionArg () const |
Get the value for –hip-version argument. More... | |
std::string | getHIPVersion () const |
A class to find a viable ROCM installation TODO: Generalize to handle libclc.
RocmInstallationDetector::RocmInstallationDetector | ( | const Driver & | D, |
const llvm::Triple & | HostTriple, | ||
const llvm::opt::ArgList & | Args, | ||
bool | DetectHIPRuntime = true , |
||
bool | DetectDeviceLib = false |
||
) |
Definition at line 297 of file AMDGPU.cpp.
References detectDeviceLibrary(), detectHIPRuntime(), and clang::driver::Driver::Diag().
void RocmInstallationDetector::AddHIPIncludeArgs | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args | ||
) | const |
Definition at line 470 of file AMDGPU.cpp.
References clang::driver::Driver::Diag(), getIncludePath(), hasHIPRuntime(), P, and clang::driver::Driver::ResourceDir.
Referenced by clang::driver::toolchains::Linux::AddHIPIncludeArgs(), clang::driver::toolchains::FreeBSD::AddHIPIncludeArgs(), clang::driver::toolchains::HIPToolChain::AddHIPIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddHIPIncludeArgs(), and clang::driver::toolchains::Darwin::AddHIPIncludeArgs().
void RocmInstallationDetector::detectDeviceLibrary | ( | ) |
Definition at line 343 of file AMDGPU.cpp.
Referenced by RocmInstallationDetector(), and clang::driver::toolchains::ROCMToolChain::ROCMToolChain().
void RocmInstallationDetector::detectHIPRuntime | ( | ) |
Definition at line 425 of file AMDGPU.cpp.
Referenced by RocmInstallationDetector().
|
inline |
Returns empty string of Asan runtime library is not available.
Definition at line 194 of file ROCm.h.
Referenced by clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().
llvm::SmallVector< std::string, 12 > RocmInstallationDetector::getCommonBitcodeLibs | ( | const llvm::opt::ArgList & | DriverArgs, |
StringRef | LibDeviceFile, | ||
bool | Wave64, | ||
bool | DAZ, | ||
bool | FiniteOnly, | ||
bool | UnsafeMathOpt, | ||
bool | FastRelaxedMath, | ||
bool | CorrectSqrt | ||
) | const |
Get file paths of default bitcode libraries common to AMDGPU based toolchains.
Definition at line 778 of file AMDGPU.cpp.
Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions(), and clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 188 of file ROCm.h.
References clang::HIP.
Referenced by clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().
|
inline |
|
inline |
|
inline |
Get the detected path to Rocm's bin directory.
Get the detected Rocm Include path.
Definition at line 165 of file ROCm.h.
Referenced by AddHIPIncludeArgs().
|
inline |
|
inline |
Get libdevice file for given architecture.
Definition at line 217 of file ROCm.h.
Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions(), and clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 183 of file ROCm.h.
References clang::OpenCL.
Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions().
|
inline |
Get the values for –rocm-device-lib-path arguments.
Definition at line 228 of file ROCm.h.
Referenced by clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().
|
inline |
|
inline |
|
inline |
|
inline |
Check whether we detected a valid ROCm device library.
Definition at line 150 of file ROCm.h.
Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions(), and clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().
|
inline |
Check whether we detected a valid HIP runtime.
Definition at line 147 of file ROCm.h.
Referenced by AddHIPIncludeArgs(), and print().
void RocmInstallationDetector::print | ( | raw_ostream & | OS | ) | const |
Print information about the detected ROCm installation.
Definition at line 464 of file AMDGPU.cpp.
References hasHIPRuntime().
Referenced by clang::driver::toolchains::MSVCToolChain::printVerboseInfo(), clang::driver::toolchains::Generic_GCC::printVerboseInfo(), and clang::driver::toolchains::Darwin::printVerboseInfo().