clang 17.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, DeviceLibABIVersion ABIVer, bool isOpenMP) const |
Get file paths of default bitcode libraries common to AMDGPU based toolchains. | |
bool | checkCommonBitcodeLibs (StringRef GPUArch, StringRef LibDeviceFile, DeviceLibABIVersion ABIVer) const |
Check file paths of default bitcode libraries common to AMDGPU based toolchains. | |
bool | hasHIPRuntime () const |
Check whether we detected a valid HIP runtime. | |
bool | hasDeviceLibrary () const |
Check whether we detected a valid ROCm device library. | |
void | print (raw_ostream &OS) const |
Print information about the detected ROCm installation. | |
StringRef | getInstallPath () const |
Get the detected Rocm install's version. | |
StringRef | getIncludePath () const |
Get the detected path to Rocm's bin directory. | |
StringRef | getLibPath () const |
Get the detected Rocm library path. | |
StringRef | getLibDevicePath () const |
Get the detected Rocm device library path. | |
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. | |
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 |
StringRef | getABIVersionPath (DeviceLibABIVersion ABIVer) const |
StringRef | getLibDeviceFile (StringRef Gpu) const |
Get libdevice file for given architecture. | |
void | AddHIPIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
void | detectDeviceLibrary () |
void | detectHIPRuntime () |
ArrayRef< std::string > | getRocmDeviceLibPathArg () const |
Get the values for –rocm-device-lib-path arguments. | |
StringRef | getRocmPathArg () const |
Get the value for –rocm-path argument. | |
StringRef | getHIPVersionArg () const |
Get the value for –hip-version argument. | |
StringRef | 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 320 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 493 of file AMDGPU.cpp.
References clang::driver::Driver::Diag(), getIncludePath(), hasHIPRuntime(), P, and clang::driver::Driver::ResourceDir.
Referenced by clang::driver::toolchains::Darwin::AddHIPIncludeArgs(), and clang::driver::toolchains::MSVCToolChain::AddHIPIncludeArgs().
bool RocmInstallationDetector::checkCommonBitcodeLibs | ( | StringRef | GPUArch, |
StringRef | LibDeviceFile, | ||
DeviceLibABIVersion | ABIVer | ||
) | const |
Check file paths of default bitcode libraries common to AMDGPU based toolchains.
Definition at line 833 of file AMDGPU.cpp.
References clang::driver::DeviceLibABIVersion::requiresLibrary(), and clang::driver::DeviceLibABIVersion::toString().
void RocmInstallationDetector::detectDeviceLibrary | ( | ) |
Definition at line 369 of file AMDGPU.cpp.
References clang::driver::Driver::getVFS(), and clang::driver::Driver::ResourceDir.
Referenced by RocmInstallationDetector().
void RocmInstallationDetector::detectHIPRuntime | ( | ) |
Definition at line 432 of file AMDGPU.cpp.
References clang::driver::Driver::getVFS().
Referenced by RocmInstallationDetector().
|
inline |
Definition at line 247 of file ROCm.h.
References clang::driver::DeviceLibABIVersion::ABIVersion.
|
inline |
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, | ||
DeviceLibABIVersion | ABIVer, | ||
bool | isOpenMP = false |
||
) | const |
Get file paths of default bitcode libraries common to AMDGPU based toolchains.
Definition at line 852 of file AMDGPU.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 219 of file ROCm.h.
References clang::HIP.
|
inline |
|
inline |
|
inline |
Get the detected path to Rocm's bin directory.
Get the detected Rocm Include path.
Definition at line 196 of file ROCm.h.
Referenced by AddHIPIncludeArgs().
|
inline |
|
inline |
|
inline |
|
inline |
Get the detected Rocm library path.
Definition at line 199 of file ROCm.h.
Referenced by clang::driver::toolchains::MSVCToolChain::AddHIPRuntimeLibArgs().
|
inline |
|
inline |
|
inline |
Definition at line 214 of file ROCm.h.
References clang::OpenCL.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Check whether we detected a valid HIP runtime.
Definition at line 178 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 487 of file AMDGPU.cpp.
References hasHIPRuntime().
Referenced by clang::driver::toolchains::Darwin::printVerboseInfo(), and clang::driver::toolchains::MSVCToolChain::printVerboseInfo().