clang 20.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. | |
bool | hasHIPStdParLibrary () const |
Check whether we detected a valid HIP STDPAR Acceleration 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 322 of file AMDGPU.cpp.
References D, detectDeviceLibrary(), and detectHIPRuntime().
void RocmInstallationDetector::AddHIPIncludeArgs | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args | ||
) | const |
Definition at line 527 of file AMDGPU.cpp.
References clang::driver::Driver::Diag(), getIncludePath(), clang::driver::Driver::getVFS(), hasHIPRuntime(), hasHIPStdParLibrary(), P, and clang::driver::Driver::ResourceDir.
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 978 of file AMDGPU.cpp.
References D, clang::driver::DeviceLibABIVersion::requiresLibrary(), and clang::driver::DeviceLibABIVersion::toString().
void RocmInstallationDetector::detectDeviceLibrary | ( | ) |
Definition at line 385 of file AMDGPU.cpp.
References clang::driver::Driver::getVFS(), Path, and clang::driver::Driver::ResourceDir.
Referenced by RocmInstallationDetector().
void RocmInstallationDetector::detectHIPRuntime | ( | ) |
Definition at line 448 of file AMDGPU.cpp.
References Append(), b, c, clang::driver::Driver::getVFS(), and clang::driver::Driver::SysRoot.
Referenced by RocmInstallationDetector().
|
inline |
Definition at line 260 of file ROCm.h.
References clang::driver::DeviceLibABIVersion::ABIVersion, and Loc.
|
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 997 of file AMDGPU.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 232 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 209 of file ROCm.h.
Referenced by AddHIPIncludeArgs().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 227 of file ROCm.h.
References clang::OpenCL.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Check whether we detected a valid HIP runtime.
Definition at line 188 of file ROCm.h.
Referenced by AddHIPIncludeArgs(), and print().
|
inline |
Check whether we detected a valid HIP STDPAR Acceleration library.
Definition at line 194 of file ROCm.h.
Referenced by AddHIPIncludeArgs().
void RocmInstallationDetector::print | ( | raw_ostream & | OS | ) | const |
Print information about the detected ROCm installation.
Definition at line 521 of file AMDGPU.cpp.
References hasHIPRuntime().