|
clang 22.0.0git
|
A class to find a viable ROCM installation TODO: Generalize to handle libclc. More...
#include "clang/Driver/RocmInstallationDetector.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< ToolChain::BitCodeLibraryInfo, 12 > | getCommonBitcodeLibs (const llvm::opt::ArgList &DriverArgs, StringRef LibDeviceFile, StringRef GPUArch, const Action::OffloadKind DeviceOffloadingKind, const bool NeedsASanRT) 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 | 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 | 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.
Definition at line 41 of file RocmInstallationDetector.h.
| RocmInstallationDetector::RocmInstallationDetector | ( | const Driver & | D, |
| const llvm::Triple & | HostTriple, | ||
| const llvm::opt::ArgList & | Args, | ||
| bool | DetectHIPRuntime = true, | ||
| bool | DetectDeviceLib = false ) |
Definition at line 324 of file AMDGPU.cpp.
References detectDeviceLibrary(), detectHIPRuntime(), and clang::if().
| void RocmInstallationDetector::AddHIPIncludeArgs | ( | const llvm::opt::ArgList & | DriverArgs, |
| llvm::opt::ArgStringList & | CC1Args ) const |
Definition at line 522 of file AMDGPU.cpp.
References getIncludePath(), hasHIPRuntime(), and hasHIPStdParLibrary().
| 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 999 of file AMDGPU.cpp.
References getABIVersionPath(), clang::driver::DeviceLibABIVersion::getAsCodeObjectVersion(), hasDeviceLibrary(), clang::driver::DeviceLibABIVersion::requiresLibrary(), and clang::driver::DeviceLibABIVersion::toString().
| void RocmInstallationDetector::detectDeviceLibrary | ( | ) |
Definition at line 384 of file AMDGPU.cpp.
Referenced by RocmInstallationDetector().
| void RocmInstallationDetector::detectHIPRuntime | ( | ) |
Definition at line 447 of file AMDGPU.cpp.
References Append(), b, and c.
Referenced by RocmInstallationDetector().
|
inline |
Definition at line 259 of file RocmInstallationDetector.h.
References clang::driver::DeviceLibABIVersion::ABIVersion.
Referenced by checkCommonBitcodeLibs(), and getCommonBitcodeLibs().
|
inline |
Returns empty string of Asan runtime library is not available.
Definition at line 241 of file RocmInstallationDetector.h.
Referenced by getCommonBitcodeLibs().
| llvm::SmallVector< ToolChain::BitCodeLibraryInfo, 12 > RocmInstallationDetector::getCommonBitcodeLibs | ( | const llvm::opt::ArgList & | DriverArgs, |
| StringRef | LibDeviceFile, | ||
| StringRef | GPUArch, | ||
| const Action::OffloadKind | DeviceOffloadingKind, | ||
| const bool | NeedsASanRT ) const |
Get file paths of default bitcode libraries common to AMDGPU based toolchains.
Definition at line 1024 of file AMDGPU.cpp.
References getABIVersionPath(), getAsanRTLPath(), getCorrectlyRoundedSqrtPath(), getFiniteOnlyPath(), getOCKLPath(), getOCMLPath(), getUnsafeMathPath(), getWavefrontSize64Path(), and clang::driver::ToolChain::BitCodeLibraryInfo::ShouldInternalize.
|
inline |
Definition at line 255 of file RocmInstallationDetector.h.
Referenced by getCommonBitcodeLibs().
|
inline |
Definition at line 247 of file RocmInstallationDetector.h.
Referenced by getCommonBitcodeLibs().
|
inline |
Definition at line 291 of file RocmInstallationDetector.h.
|
inline |
Get the value for –hip-version argument.
Definition at line 289 of file RocmInstallationDetector.h.
|
inline |
Get the detected path to Rocm's bin directory.
Get the detected Rocm Include path.
Definition at line 217 of file RocmInstallationDetector.h.
Referenced by AddHIPIncludeArgs().
|
inline |
Get the detected Rocm install's version.
Get the detected Rocm installation path.
Definition at line 211 of file RocmInstallationDetector.h.
|
inline |
Get libdevice file for given architecture.
Definition at line 267 of file RocmInstallationDetector.h.
|
inline |
Get the detected Rocm device library path.
Definition at line 223 of file RocmInstallationDetector.h.
|
inline |
Get the detected Rocm library path.
Definition at line 220 of file RocmInstallationDetector.h.
|
inline |
Definition at line 230 of file RocmInstallationDetector.h.
Referenced by getCommonBitcodeLibs().
|
inline |
Definition at line 225 of file RocmInstallationDetector.h.
Referenced by getCommonBitcodeLibs().
|
inline |
Definition at line 235 of file RocmInstallationDetector.h.
|
inline |
Get the values for –rocm-device-lib-path arguments.
Definition at line 281 of file RocmInstallationDetector.h.
|
inline |
Get the value for –rocm-path argument.
Definition at line 286 of file RocmInstallationDetector.h.
|
inline |
Definition at line 251 of file RocmInstallationDetector.h.
Referenced by getCommonBitcodeLibs().
|
inline |
Definition at line 243 of file RocmInstallationDetector.h.
Referenced by getCommonBitcodeLibs().
|
inline |
Check whether we detected a valid ROCm device library.
Definition at line 199 of file RocmInstallationDetector.h.
Referenced by checkCommonBitcodeLibs().
|
inline |
Check whether we detected a valid HIP runtime.
Definition at line 196 of file RocmInstallationDetector.h.
Referenced by AddHIPIncludeArgs(), and print().
|
inline |
Check whether we detected a valid HIP STDPAR Acceleration library.
Definition at line 202 of file RocmInstallationDetector.h.
Referenced by AddHIPIncludeArgs().
| void RocmInstallationDetector::print | ( | raw_ostream & | OS | ) | const |
Print information about the detected ROCm installation.
Definition at line 516 of file AMDGPU.cpp.
References hasHIPRuntime().