clang  14.0.0git
Classes | Public Member Functions | List of all members
clang::driver::RocmInstallationDetector Class Reference

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::stringgetRocmDeviceLibPathArg () 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
 

Detailed Description

A class to find a viable ROCM installation TODO: Generalize to handle libclc.

Definition at line 27 of file ROCm.h.

Constructor & Destructor Documentation

◆ RocmInstallationDetector()

RocmInstallationDetector::RocmInstallationDetector ( const Driver D,
const llvm::Triple &  HostTriple,
const llvm::opt::ArgList &  Args,
bool  DetectHIPRuntime = true,
bool  DetectDeviceLib = false 
)

Member Function Documentation

◆ AddHIPIncludeArgs()

void RocmInstallationDetector::AddHIPIncludeArgs ( const llvm::opt::ArgList &  DriverArgs,
llvm::opt::ArgStringList &  CC1Args 
) const

◆ detectDeviceLibrary()

void RocmInstallationDetector::detectDeviceLibrary ( )

◆ detectHIPRuntime()

void RocmInstallationDetector::detectHIPRuntime ( )

Definition at line 434 of file AMDGPU.cpp.

Referenced by RocmInstallationDetector().

◆ getAsanRTLPath()

StringRef clang::driver::RocmInstallationDetector::getAsanRTLPath ( ) const
inline

Returns empty string of Asan runtime library is not available.

Definition at line 195 of file ROCm.h.

Referenced by clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().

◆ getCommonBitcodeLibs()

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 869 of file AMDGPU.cpp.

Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions(), and clang::driver::toolchains::ROCMToolChain::getCommonDeviceLibNames().

◆ getCorrectlyRoundedSqrtPath()

StringRef clang::driver::RocmInstallationDetector::getCorrectlyRoundedSqrtPath ( bool  Enabled) const
inline

Definition at line 213 of file ROCm.h.

◆ getDenormalsAreZeroPath()

StringRef clang::driver::RocmInstallationDetector::getDenormalsAreZeroPath ( bool  Enabled) const
inline

Definition at line 209 of file ROCm.h.

◆ getFiniteOnlyPath()

StringRef clang::driver::RocmInstallationDetector::getFiniteOnlyPath ( bool  Enabled) const
inline

Definition at line 201 of file ROCm.h.

◆ getHIPPath()

StringRef clang::driver::RocmInstallationDetector::getHIPPath ( ) const
inline

Definition at line 189 of file ROCm.h.

References clang::HIP.

Referenced by clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().

◆ getHIPVersion()

std::string clang::driver::RocmInstallationDetector::getHIPVersion ( ) const
inline

Definition at line 239 of file ROCm.h.

◆ getHIPVersionArg()

StringRef clang::driver::RocmInstallationDetector::getHIPVersionArg ( ) const
inline

Get the value for –hip-version argument.

Definition at line 237 of file ROCm.h.

◆ getIncludePath()

StringRef clang::driver::RocmInstallationDetector::getIncludePath ( ) const
inline

Get the detected path to Rocm's bin directory.

Get the detected Rocm Include path.

Definition at line 166 of file ROCm.h.

Referenced by AddHIPIncludeArgs().

◆ getInstallPath()

StringRef clang::driver::RocmInstallationDetector::getInstallPath ( ) const
inline

Get the detected Rocm install's version.

Get the detected Rocm installation path.

Definition at line 160 of file ROCm.h.

◆ getLibDeviceFile()

std::string clang::driver::RocmInstallationDetector::getLibDeviceFile ( StringRef  Gpu) const
inline

Get libdevice file for given architecture.

Definition at line 218 of file ROCm.h.

Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions(), and clang::driver::toolchains::ROCMToolChain::getCommonDeviceLibNames().

◆ getLibDevicePath()

StringRef clang::driver::RocmInstallationDetector::getLibDevicePath ( ) const
inline

Get the detected Rocm device library path.

Definition at line 172 of file ROCm.h.

◆ getLibPath()

StringRef clang::driver::RocmInstallationDetector::getLibPath ( ) const
inline

Get the detected Rocm library path.

Definition at line 169 of file ROCm.h.

◆ getOCKLPath()

StringRef clang::driver::RocmInstallationDetector::getOCKLPath ( ) const
inline

Definition at line 179 of file ROCm.h.

◆ getOCMLPath()

StringRef clang::driver::RocmInstallationDetector::getOCMLPath ( ) const
inline

Definition at line 174 of file ROCm.h.

◆ getOpenCLPath()

StringRef clang::driver::RocmInstallationDetector::getOpenCLPath ( ) const
inline

Definition at line 184 of file ROCm.h.

References clang::OpenCL.

Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions().

◆ getRocmDeviceLibPathArg()

std::vector<std::string> clang::driver::RocmInstallationDetector::getRocmDeviceLibPathArg ( ) const
inline

Get the values for –rocm-device-lib-path arguments.

Definition at line 229 of file ROCm.h.

Referenced by clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().

◆ getRocmPathArg()

StringRef clang::driver::RocmInstallationDetector::getRocmPathArg ( ) const
inline

Get the value for –rocm-path argument.

Definition at line 234 of file ROCm.h.

◆ getUnsafeMathPath()

StringRef clang::driver::RocmInstallationDetector::getUnsafeMathPath ( bool  Enabled) const
inline

Definition at line 205 of file ROCm.h.

◆ getWavefrontSize64Path()

StringRef clang::driver::RocmInstallationDetector::getWavefrontSize64Path ( bool  Enabled) const
inline

Definition at line 197 of file ROCm.h.

◆ hasDeviceLibrary()

bool clang::driver::RocmInstallationDetector::hasDeviceLibrary ( ) const
inline

Check whether we detected a valid ROCm device library.

Definition at line 151 of file ROCm.h.

Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions(), and clang::driver::toolchains::HIPToolChain::getHIPDeviceLibs().

◆ hasHIPRuntime()

bool clang::driver::RocmInstallationDetector::hasHIPRuntime ( ) const
inline

Check whether we detected a valid HIP runtime.

Definition at line 148 of file ROCm.h.

Referenced by AddHIPIncludeArgs(), and print().

◆ print()

void RocmInstallationDetector::print ( raw_ostream &  OS) const

The documentation for this class was generated from the following files: