13 #ifndef NVVM_DIALECT_NVVM_IR_NVVMREQUIRESSMTRAITS_H_
14 #define NVVM_DIALECT_NVVM_IR_NVVMREQUIRESSMTRAITS_H_
18 #include "llvm/ADT/StringExtras.h"
35 template <
typename... Ints>
39 "non arch-accelerated SM version list must be a single version!");
44 "target SM version list must be a single version!");
67 bool isAA = smVersionString.back() ==
'a';
70 smVersionString.drop_front(3)
71 .take_while([](
char c) {
return llvm::isDigit(c); })
72 .getAsInteger(10, smVersionInt);
81 #include "mlir/Dialect/LLVMIR/NVVMRequiresSMTraits.h.inc"
87 template <
int MinVersion>
90 template <
typename ConcreteOp>
101 template <
int... SMVersions>
104 template <
typename ConcreteOp>
106 NVVMRequiresSMa<SMVersions...>::Impl>,
const NVVM::NVVMCheckSMVersion getRequiredMinSMVersion() const
const NVVM::NVVMCheckSMVersion getRequiredMinSMVersion() const
Helper class for implementing traits.
Include the generated interface declarations.
bool isMinimumSMVersion() const
NVVMCheckSMVersion(bool archAccelerated, Ints... smVersions)
bool isCompatibleWith(const NVVMCheckSMVersion &targetSM) const
llvm::SmallVector< int, 1 > smVersionList
static const NVVMCheckSMVersion getTargetSMVersionFromStr(StringRef smVersionString)