[llvm] [clang] [CUDA] Add support for CUDA-12.3 and sm_90a (PR #74895)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 8 15:44:32 PST 2023


================
@@ -80,8 +85,10 @@ class NVPTXSubtarget : public NVPTXGenSubtargetInfo {
   bool allowFP16Math() const;
   bool hasMaskOperator() const { return PTXVersion >= 71; }
   bool hasNoReturn() const { return SmVersion >= 30 && PTXVersion >= 64; }
-  unsigned int getSmVersion() const { return SmVersion; }
+  unsigned int getSmVersion() const { return FullSmVersion / 10; }
+  unsigned int getFullSmVersion() const { return FullSmVersion; }
   std::string getTargetName() const { return TargetName; }
+  bool isSm90a() const { return getFullSmVersion() == 901; }
----------------
jhuber6 wrote:

Yeah, I was thinking that the internal representation would just be what "FullSMVersion" is now, but `getSMVersion` would return `/ 10` and `getFeatures` or something would be `% 10`.

https://github.com/llvm/llvm-project/pull/74895


More information about the cfe-commits mailing list